Program to rename files from a txt file. |
- No Warez. This includes warez links, cracks and/or requests for help in getting illegal software or copyrighted music tracks!
- No Spamming or Trolling on the boards, this includes useless posts, trying to only increase post count or trying to deliberately create a flame war.
- No Hateful or Disrespectful posts. This includes: bashing, name-calling or insults directed at a board member.
- Click here for complete Hydrogenaudio Terms of Service
![]() ![]() |
Program to rename files from a txt file. |
Aug 16 2003, 22:18
Post
#1
|
|
|
Group: Members Posts: 61 Joined: 1-August 03 Member No.: 8113 |
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. |
|
|
|
Aug 17 2003, 00:29
Post
#2
|
|
|
Founder Group: Admin Posts: 2958 Joined: 26-August 02 From: Nottingham, UK Member No.: 1 |
QUOTE (bid @ Aug 16 2003, 02:18 PM) 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. |
|
|
|
Aug 17 2003, 00:44
Post
#3
|
|
|
Group: Members Posts: 22 Joined: 31-December 02 Member No.: 4333 |
Or even easier you could do it with a batch file
|
|
|
|
Aug 17 2003, 02:56
Post
#4
|
|
|
Group: Members Posts: 61 Joined: 1-August 03 Member No.: 8113 |
QUOTE (_io_ @ Aug 16 2003, 03:44 PM) Or even easier you could do it with a batch file |
|
|
|
Aug 17 2003, 11:16
Post
#5
|
|
|
Group: Members Posts: 22 Joined: 31-December 02 Member No.: 4333 |
CODE 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 This post has been edited by _io_: Aug 17 2003, 11:16 |
|
|
|
Aug 17 2003, 23:19
Post
#6
|
|
|
Group: Members Posts: 44 Joined: 10-August 03 Member No.: 8294 |
QUOTE (_io_ @ Aug 17 2003, 02:16 AM) CODE 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 |
|
|
|
Aug 18 2003, 00:14
Post
#7
|
|
|
Group: Members Posts: 22 Joined: 31-December 02 Member No.: 4333 |
Which OS you using?
|
|
|
|
Aug 18 2003, 05:31
Post
#8
|
|
![]() Group: Members Posts: 158 Joined: 16-May 03 From: nsk.su Member No.: 6653 |
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.
|
|
|
|
Aug 18 2003, 06:04
Post
#9
|
|
|
Group: Members Posts: 44 Joined: 10-August 03 Member No.: 8294 |
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 This post has been edited by alanofoz: Aug 18 2003, 06:09 -------------------- Cheers,
Alan |
|
|
|
Aug 18 2003, 06:15
Post
#10
|
|
![]() Group: Members Posts: 158 Joined: 16-May 03 From: nsk.su Member No.: 6653 |
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.
|
|
|
|
Aug 18 2003, 12:50
Post
#11
|
|
|
Group: Developer Posts: 717 Joined: 25-September 01 From: ... The Studio Member No.: 20 |
4DOS/4NT has a greatly extended scripting/programming language that makes almost anything possible. If you know how to do it in Linux using a shell script, then be aware that there are plenty of POSIX/GNU shells and environments for native Win32, Cygwin excluded. You have the tools compiled with the AT&T UWIN kit, MinGW's msys, Microsoft's ksh from the Unix Services package, and the DOS ports of pdksh and bash, along with all the standard shell tools.
If these files are eTree audio that you want to rename, you should check out Trader's Friend for foobar2000; it automaticly renames/tags eTree files. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 06:28 |