Skip to main content

Topic: Program to rename files from a txt file. (Read 3233 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • bid
  • [*][*]
Program to rename files from a txt file.
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.

  • Dibrom
  • [*][*][*][*][*]
  • Administrator
Program to rename files from a txt file.
Reply #1
Quote
I don't feel like writing a "3 page" Java program with windows.

Why not use something simpler then, like Python.

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.
  • Last Edit: 16 August, 2003, 07:30:22 PM by Dibrom

  • _io_
  • [*]
Program to rename files from a txt file.
Reply #2
Or even easier you could do it with a batch file

  • bid
  • [*][*]
Program to rename files from a txt file.
Reply #3
Quote
Or even easier you could do it with a batch file


  • _io_
  • [*]
Program to rename files from a txt file.
Reply #4
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
  • Last Edit: 17 August, 2003, 06:16:54 AM by _io_

  • alanofoz
  • [*]
Program to rename files from a txt file.
Reply #5
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.
Cheers,
Alan

  • _io_
  • [*]
Program to rename files from a txt file.
Reply #6
Which OS you using?

  • eltoder
  • [*][*][*]
Program to rename files from a txt file.
Reply #7
This only works in NT-based OSes 

-Eugene
The  greatest  programming  project of all took six days;  on the seventh  day  the  programmer  rested.  We've been trying to debug the !@#$%&* thing ever since. Moral: design before you implement.

  • alanofoz
  • [*]
Program to rename files from a txt file.
Reply #8
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
  • Last Edit: 18 August, 2003, 01:09:22 AM by alanofoz
Cheers,
Alan

  • eltoder
  • [*][*][*]
Program to rename files from a txt file.
Reply #9
You might want to get 4DOS then. But the syntax is different, IIRC.

-Eugene
The  greatest  programming  project of all took six days;  on the seventh  day  the  programmer  rested.  We've been trying to debug the !@#$%&* thing ever since. Moral: design before you implement.

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
Program to rename files from a txt file.
Reply #10
[deleted]
  • Last Edit: 27 August, 2015, 03:57:40 PM by TrNSZ