User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » 'renames files in a directory from a list' Page [1]  
poison_nut
Starting Lineup
91 Posts
user info
edit post

I need a script written or existing tool that will take two variables such as file names in a particular directory(12345.jpg), read in a file (CSV perhaps) that looks something like this...

MatchingColumn RenameColumn
12345 XYZ123

and rename 12345.jpg to XYZ123.JPG

Essentially it renames files in a directory from a list.

Can anyone help? Ideally it would run in a batch process.

Thanks

7/13/2006 4:32:58 PM

David0603
All American
12764 Posts
user info
edit post

I can do it for $$$.

7/13/2006 4:34:30 PM

confusi0n
All American
5076 Posts
user info
edit post

you could write excel VBA to do that in a couple of lines.

7/13/2006 4:38:00 PM

qntmfred
retired
40726 Posts
user info
edit post

I can do it for $$.

7/13/2006 4:55:21 PM

David0603
All American
12764 Posts
user info
edit post

I was thinking perl.

7/13/2006 5:16:58 PM

smoothcrim
Universal Magnetic!
18966 Posts
user info
edit post

string filename = "blah.txt"
dir > filename
string newfilename = ""
while (filename.readline()!=null){
newfilename += "crapyouwannaaddon" + filename.readline()
system.out("mv .\"+filename+".\"+newfilename)
}
that template should be close to what ypu need in a ton of languages

[Edited on July 13, 2006 at 5:41 PM. Reason : d]

7/13/2006 5:40:14 PM

 Message Boards » Tech Talk » 'renames files in a directory from a list' Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.