Something that pulls from a txt file. Anyone know of one off hand?
Looking for mass file renamer....
Collapse
X
-
Tags: None
-
Mmmm.. if you mean something like....Originally posted by TampaTokerSomething that pulls from a txt file. Anyone know of one off hand?
A file named 9995.jpg and you want to rename it to nude-girl.jpg ?
ie.. where you have a file listing of the source files and a file listing of the new renamed files?Last edited by Webby; 07-08-2006, 02:17 PM.XXX TLD's - Another mosquito to swat. -
Originally posted by WebbyMmmm.. if you mean something like....
A file named 9995.jpg and you want to rename it to nude-girl.jpg ?
Correct but its gotta pull from a txt file. i got about 12k of files i gotta do
Icq 247-742-205Comment
-
OK.. no problemo!Originally posted by TampaTokerCorrect but its gotta pull from a txt file. i got about 12k of files i gotta do
I've been using simple DOS batch files to do this, tho was thinking of writing a small utility.
Just to confirm this is exactly what is needed... ie you have a text list of source files in one dir and you have created a text list of "final filenames"?
If so, this can be done with.. (least that's the way I've done it).. with two small batch files and a main .txt file in this format...
9999.jpg nude-girl.jpg
5553.jpg sex.jpg
etc
It will basically rename 1000's in a minute. But.. not sure if this is what you may want - ie.. you need to know and have a list of the "final file names"?XXX TLD's - Another mosquito to swat.Comment
-
Originally posted by WebbyOK.. no problemo!
I've been using simple DOS batch files to do this, tho was thinking of writing a small utility.
Just to confirm this is exactly what is needed... ie you have a text list of source files in one dir and you have created a text list of "final filenames"?
If so, this can be done with.. (least that's the way I've done it).. with two small batch files and a main .txt file in this format...
9999.jpg nude-girl.jpg
5553.jpg sex.jpg
etc
It will basically rename 1000's in a minute. But.. not sure if this is what you may want - ie.. you need to know and have a list of the "final file names"?
Yes just want i wantand yes i have a list of the "final file names
Last edited by TampaToker; 07-08-2006, 02:30 PM.Icq 247-742-205Comment
-
Check snapfiles.com. Great shareware & freeware.Comment
-
OK.. Basically three batch files, one filelist.txt (containing your source filenames and the final filenames) and a file called fragment.txt.Originally posted by TampaTokerYes just want i wantand yes i have a list of the "final file names
Batch Files:
The actual batch file content below is contained within "<" to avoid confusion.
renameimages.bat:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
cls
@echo off
:backit
copy filelist.txt filelist.bak
echo backed up filelist.txt to filelist.bak!
:start
copy fragment.txt + filelist.txt temp.bat > nul
call temp.bat
type temp.bat | find /v "process.bat" > filelist.txt
copy filelist.txt nul | find "0" > nul
if errorlevel 1 goto start
:done
copy filelist.bak filelist.txt
echo restoring filelist.txt from filelist.bak
echo Process Complete!
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: This is just a calling batch file (and yea, know there is a small error in it, but that will not affect the results - just never had time to look at it).
process.bat:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
echo Processing %1
ren %1 %2
echo Finished %1
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: This is where you stuff the DOS commands of whatever you want to do. I've left it with "rename parameter 1 to parameter 2" since this is prob what you want to do.
temp.bat:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
process.bat
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: Only one line with "process.bat " - note the space after .bat
fragment.txt:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
process.bat
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: Contains exactly the same content as temp.bat.
OK.. Next is the bit you supply... filelist.txt which is a listing of your source image names and the final image names - each set of filenames are on one line within the txt file.
ie
dfgsdg.jpg hot-girls.jpg
fdsfgdp.jpg nude-girls.jpg
Overview:
The only batch file to call is renameimages.bat this will make a copy of your filelist.txt, renaming this to filelist.bak (Tho!!! Highly recommend keeping a master elsewhere, since the batch process removes one line at a time from your list).
Create the batch files first and test them out on a "non sensitive" area and see the effect. This set of batch files can actually be used for many things - image renaming being one.XXX TLD's - Another mosquito to swat.Comment
-
Originally posted by WebbyOK.. Basically three batch files, one filelist.txt (containing your source filenames and the final filenames) and a file called fragment.txt.
Batch Files:
The actual batch file content below is contained within "<" to avoid confusion.
renameimages.bat:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
cls
@echo off
:backit
copy filelist.txt filelist.bak
echo backed up filelist.txt to filelist.bak!
:start
copy fragment.txt + filelist.txt temp.bat > nul
call temp.bat
type temp.bat | find /v "process.bat" > filelist.txt
copy filelist.txt nul | find "0" > nul
if errorlevel 1 goto start
:done
copy filelist.bak filelist.txt
echo restoring filelist.txt from filelist.bak
echo Process Complete!
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: This is just a calling batch file (and yea, know there is a small error in it, but that will not affect the results - just never had time to look at it).
process.bat:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
echo Processing %1
ren %1 %2
echo Finished %1
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: This is where you stuff the DOS commands of whatever you want to do. I've left it with "rename parameter 1 to parameter 2" since this is prob what you want to do.
temp.bat:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
process.bat
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: Only one line with "process.bat " - note the space after .bat
fragment.txt:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
process.bat
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Note: Contains exactly the same content as temp.bat.
OK.. Next is the bit you supply... filelist.txt which is a listing of your source image names and the final image names - each set of filenames are on one line within the txt file.
ie
dfgsdg.jpg hot-girls.jpg
fdsfgdp.jpg nude-girls.jpg
Overview:
The only batch file to call is renameimages.bat this will make a copy of your filelist.txt, renaming this to filelist.bak (Tho!!! Highly recommend keeping a master elsewhere, since the batch process removes one line at a time from your list).
Create the batch files first and test them out on a "non sensitive" area and see the effect. This set of batch files can actually be used for many things - image renaming being one.
Thanks alot Webby
Icq 247-742-205Comment
-


Comment