IPB

Welcome Guest ( Log In | Register )

> Hydrogenaudio Forum Rules

- 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

 
Reply to this topicStart new topic
Program to rename files from a txt file.
bid
post 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.
Go to the top of the page
+Quote Post
Dibrom
post 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.
Go to the top of the page
+Quote Post
_io_
post 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
Go to the top of the page
+Quote Post
bid
post 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

smile.gif
Go to the top of the page
+Quote Post
_io_
post 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
Go to the top of the page
+Quote Post
alanofoz
post Aug 17 2003, 23:19
Post #6





Group: Members
Posts: 46
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
Go to the top of the page
+Quote Post
_io_
post Aug 18 2003, 00:14
Post #7





Group: Members
Posts: 22
Joined: 31-December 02
Member No.: 4333



Which OS you using?
Go to the top of the page
+Quote Post
eltoder
post 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 dry.gif

-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.
Go to the top of the page
+Quote Post
alanofoz
post Aug 18 2003, 06:04
Post #9





Group: Members
Posts: 46
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
Go to the top of the page
+Quote Post
eltoder
post 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.
Go to the top of the page
+Quote Post
TrNSZ
post Aug 18 2003, 12:50
Post #11





Group: Developer
Posts: 717
Joined: 25-September 01
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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 05:55