Computing.Net > Forums > Programming > Renaming alot of files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Renaming alot of files

Reply to Message Icon

Name: ceriall
Date: October 20, 2008 at 00:20:56 Pacific
OS: Winxp
CPU/Ram: Intel
Product: 2008
Comment:

Hey can anyone help me with some code?
Im needing a script that renaming alot of files, the new filenames are to be specified frome a txt called krigsvoll.txt.
The script have to rename frome the smallest number like,
4953 -> 4953.jpg
4954 -> 4954.jpg
4958 -> 4958.jpg

=)



Sponsored Link
Ads by Google

Response Number 1
Name: amlife
Date: October 20, 2008 at 08:15:23 Pacific
Reply:

I guess you need to use REN command if you
are looking to use batch scripting.

RENAME [drive:][path]filename1 filename2.
REN [drive:][path]filename1 filename2.

REN %systemdrive%\*.* *. jpg

I think that single line should take care of
it.

just put it on notepad & save it to
script.bat

can be run by clicking on it.



0

Response Number 2
Name: tonysathre
Date: October 20, 2008 at 20:03:46 Pacific
Reply:


for /f "tokens=*" %%f in ('dir /b') do (
rename "%%f" "%%f.jpg"
)


0

Response Number 3
Name: ceriall
Date: October 21, 2008 at 00:07:30 Pacific
Reply:

Ty for the response,
The script has to get new filenames frome a txt called liste.txt
And copy itself to a new dir


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Renaming alot of files

Program to rename tons of files? www.computing.net/answers/programming/program-to-rename-tons-of-files/11667.html

Files rename using batch file www.computing.net/answers/programming/files-rename-using-batch-file/16230.html

rename using parts of file name www.computing.net/answers/programming/rename-using-parts-of-file-name/16868.html