HydrogenAudio

Misc. => Off-Topic => Topic started by: bid on 2003-08-16 22:18:37

Title: Program to rename files from a txt file.
Post by: bid on 2003-08-16 22:18:37
Is there a program, for windows, that will rename a bunch of files with information contained in a text file.

I realize that, with Linux, it is very easy to so this with a "3 line" shell script, but I don't have Linux installed and I don't feel like writing a "3 page" Java program with windows.
Title: Program to rename files from a txt file.
Post by: Dibrom on 2003-08-17 00:29:14
Quote
I don't feel like writing a "3 page" Java program with windows.

Why not use something simpler then, like Python (http://www.python.org).

You could easily do something like this with Python in relatively few lines.

By the way, this has nothing to do with audio so I've moved it to the off-topic section.
Title: Program to rename files from a txt file.
Post by: _io_ on 2003-08-17 00:44:47
Or even easier you could do it with a batch file
Title: Program to rename files from a txt file.
Post by: bid on 2003-08-17 02:56:20
Quote
Or even easier you could do it with a batch file

Title: Program to rename files from a txt file.
Post by: _io_ on 2003-08-17 11:16:39
Code: [Select]
FOR /F "tokens=1,2 delims='='" %%i in (textfile.txt) DO MOVE %%i %%j

Just 1 line needed, this presumes that the format of the text file is
oldname=newname
Title: Program to rename files from a txt file.
Post by: alanofoz on 2003-08-17 23:19:44
Quote
Code: [Select]
FOR /F "tokens=1,2 delims='='" %%i in (textfile.txt) DO MOVE %%i %%j

Just 1 line needed, this presumes that the format of the text file is
oldname=newname

Hmmm... tried that, got "Syntax error"!

Win98. Changed "textfile.txt" to match the file I was using. Otherwise my batch file was exactly as above.
Title: Program to rename files from a txt file.
Post by: _io_ on 2003-08-18 00:14:56
Which OS you using?
Title: Program to rename files from a txt file.
Post by: eltoder on 2003-08-18 05:31:00
This only works in NT-based OSes 

-Eugene
Title: Program to rename files from a txt file.
Post by: alanofoz on 2003-08-18 06:04:45
Win98 (as I said above). More to the point which OS should I be using?

Edit: Thanks Eugene, your reply wasn't there when I first re-opened this page.

Cheers,
Alan
Title: Program to rename files from a txt file.
Post by: eltoder on 2003-08-18 06:15:24
You might want to get 4DOS then. But the syntax is different, IIRC.

-Eugene
Title: Program to rename files from a txt file.
Post by: TrNSZ on 2003-08-18 12:50:38
[deleted]