Does anyone know how to do this?

iamme

Lifer
Jul 21, 2001
21,058
3
0
I have all my digital cam pics in my "My Pictures" folder. They are named Picture 1.jpg, Picture 2.jpg, etc, up to about 200. I just dumped another 100 pics into a new folder, instead of my "My Pictures" folder. The new batch of pics were named starting w/ Picture 1.jpg. How can I move them to the "My Pictures" folder renaming them, starting at the end of the old group (i.e. Picture 201.jpg...). Anyone know?
 

Garet Jax

Diamond Member
Feb 21, 2000
6,369
0
71
I don't know how to do it with Windows, but you could write a shell script in Unix to do it or write a Java program to do it for you. I don't know if there is anything easier.
 

iamme

Lifer
Jul 21, 2001
21,058
3
0
Originally posted by: Garet Jax
I don't know how to do it with Windows, but you could write a shell script in Unix to do it or write a Java program to do it for you. I don't know if there is anything easier.

Anything simpler? :p
 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
Originally posted by: iamme
Originally posted by: Garet Jax
I don't know how to do it with Windows, but you could write a shell script in Unix to do it or write a Java program to do it for you. I don't know if there is anything easier.

Anything simpler? :p

Write a VBS script that analyzes the filenames of the existing files in your destination folder, then have it move & rename the new files incrementally. Pretty easy to write.
 

Michael1897

Golden Member
Apr 5, 2002
1,019
0
0
I don't know how you can do it without going in yourself and changing them, but what i usually do is always save into the same folder and if there are pics whose names overlap (pic1.jpg and pic1.jpg) it will automatically rename them for me as it saves them to pic1_2 or the sort.

I wanna know too.
but i usually rename them anyway to something descriptive of the pic. *shrugs*
 

crypticlogin

Diamond Member
Feb 6, 2001
4,047
0
0
ACDSee has a really nice feature to deal with this (and not to mention it's a great image viewing tool). Just highlight what you want to rename, hit the rename key, then you're able to give it a base name, a numbering placeholder, then the starting number. So in your case, I could highlight the new folder pics then enter:

"picture ###.jpg" starting at 201

-->

picture 201.jpg
picture 202.jpg
etc.
 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
'Here's a sample VBS file that will do the trick:

Sub Main()

Dim objFSO, objDest, objOrig, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")

'--- Get the origin and destination paths and verify their validity ---

Dim strOrig, strDest, strPrefix, bValidDest, bValidOrig
bValidDest = False
bValidOrig = Flse
Do until bValidOrig
strOrig = InputBox("Enter the path to the folder that the files you would like to move are located:", "Incremental File Mover/Namer")
If Trim(strOrig & "") = "" then
Exit Sub
Else
bValidOrig = objFSO.FolderExists(strOrig)
If not bValidOrig Then
msgbox("Invalid folder!")
End If
End If
Loop
Do Until bValidDest
strDest = InputBox("Enter the path to which you would like to move the files:", "Incremental File Mover/Namer")
If Trim(strDest & "") = "" then
Exit Sub
Else
bValidDest = objFSO.FolderExists(strDest)
If not bValidDest Then
msgbox("Invalid folder!")
End If
End If
Loop
strPrefix = InputBox("Enter the prefix you would like to append to the filenames [optional]:", "Incremental File Mover/Namer")
Set objDest = objFSO.GetFolder(strDest)
Set objOrig = objFSO.GetFolder(strOrig)


'--- Analyze the files in the destination folder to determine the next increment ---

Dim iVal, strTemp
iVal = 0
on error resume next 'ignore errors that could be generated by a mal-formed filename.
For Each objFile in objDest.Files
strTemp = Trim(Mid(objFile.Name, InStr(objFile.name, " "), (Len(objFile.Name) - (InStr(objFile.Name, " ") + (Len(objFile.Name) - InStrRev(objFile.Name, "."))))) & "")
if IsNumeric(strTemp) then
If CDbl(strTemp) > iVal Then
iVal = CDbl(strTemp) + 1
End If
End if
Next
on error goto 0 'turn error checking back on.

'--- Rename and move each file accordingly ---

For Each objFile in objOrig.Files
objFile.Copy(objDest.Path & "\" & strPrefix & " " & iVal & "." & Right(objFile.Name, Len(objFile.name) - InStrRev(objFile.Name, ".")))
objFile.Delete()
iVal = iVal + 1
Next

MsgBox("Finished.")


End Sub

Call Main()
 

iamme

Lifer
Jul 21, 2001
21,058
3
0
Thanks guys, I'm going to try 'em all....esp the VBS script :)

I've been meaning to try out ACDSee anyways, since my friend swears by it.
 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
Originally posted by: iamme
Thanks guys, I'm going to try 'em all....esp the VBS script :)

I've been meaning to try out ACDSee anyways, since my friend swears by it.

Let me know how that vbs works for ya, and if you want any changes to it :)