hey well im working with Halo3 screenshot files that need converting.to make the proces faster and easyer i need a batch file to copy files from my main backup folder and rename them in alfabetical/numerical order.
spesifications
File path>C:\Backup\Xbox Backups\Halo 3 and ODST ScreenShot's
3 orignal file name eg's
>screenshot000000004AA62A103
>screenshot000000004AA62A644
>screenshot000000004AA62AAD5desierd file names
>ScreenShot0000 "0000" is a variable and keeps the files in order.output folder
>C:\Users\brody\Desktop\Shots\
please any help is a great.i would make this batch file myself but knoledge is limited to the Xcopy,echo and pause comands.
ok ive got the copy part all good and most of the renameing but i dont know how to make the variable part so far the rename code is:
(ren C:\Users\brody\Desktop\Shots\* ScreenShot*)imput file:screenshot000000004AA62A103
output file:ScreenShot000000004AA62A103all i want is a six diget number at the end not all leters and stuff.
e.g:
imput file:screenshot000000004AA62A103
output file:ScreenShot(000000 to 999999)
Do you know you can batch rename in Explorer? You can open
the folder in explorer, select all the files, rename the first to
"Screenshot (1).jpg" and the rest will number themselves. Is that
similar to what you want?
similar but not quite what i want also i have only told you a part of my code it goes threw multiple folders each folder has screenshots from a certain map but i dont need help with that i just need a six diget numeric variable eg-number that goes from 000000 to 999999. Reason for all this:
well i hav a folder with more folders in it witch are folders for spacific maps(location).in these folders are the screenshots from that map(location). ive got code to rename the screenshot part to the map name but they still have the leters and numbers at the end and they are needed to keep order but very hard to understand espesholy when there are over afew hundred screenshots for each map and there are like 30 maps all up.
I understand you want to copy files matching the pattern "screenshot*"
in folder "C:\Backup\Xbox Backups\Halo 3 and ODST ScreenShot's"
to folder "C:\Users\brody\Desktop\Shots"
with file names ScreenShot1, ScreenShot2, etc. (sequentially numbered).
Here is an alternate script.(Note that, in the script, I am using forward slashes in the path,
instead of backslashes. This alleviates having to worry about
"\t" being treated as tab, etc.
Forward slashes work in window.)
# Script screenshot.txt var str list, file var int index lf -n "screenshot*" "C:/Backup/Xbox Backups/Halo 3 and ODST ScreenShot's" > $list while ($list <> "") do lex "1" $list > $file system copy ("\""+$file+"\"") ("\"C:/Users/brody/Desktop/Shots/ScreenShot"+makestr(int($index))+"\"") set $index = $index + 1 doneScript is in biterscripting. To execute,
save the script in file "C:/Scripts/screenshot.txt",
start biterscripting, enter the following command.script "C:/Scripts/screenshot.txt"Feel free to modify the script for other such automated tasks you may need to perform.
The documentation for the lf command is at http://www.biterscripting.com/helpp... .
You will find even more goodies in that command's help page,
so you can narrow down exactly which files are 'picked' by the script to process.
Thanksthe code works perfictly but sorry to say i finished makeing a script last night after finding microsofts page on batch files this is my code: @ECHO OFF
set Game=Halo3
set MapName=Valhala
Set Count=0
Echo Grab ScreenShots From Their Folders
PAUSE
xcopy C:\Backup\XboxBackups\ScreenShot's\%Game%\%MapName% C:\Users\brody\Desktop\Shots /h/e/y/s/i/r
For %%A in (C:\Users\brody\Desktop\Shots\*) Do Call :REN %%A
Set Count=
GoTo :EOF:REN
Set /A Count=%Count%+1
Ren "%*" %Game%%MapName%%Count%
Echo Ren "%*" %Count%
GoTo :EOF