Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
DOS rename
Name: jaikki Date: January 1, 2004 at 23:38:19 Pacific OS: win2000 CPU/Ram: ?
Comment:
Hi! I need to know how to rename file 123456789.pdf to 12345-6789.pdf? I need to do this in .bat batch file. I have lots of same kind of files which needs to be renamed at the same way.
Name: JackG Date: January 2, 2004 at 00:41:17 Pacific
Reply:
REMANE "123456789.ppp" "12345-6789".pp2"
Usually works well on most versions of Window that support LFN, when I try it.
0
Response Number 2
Name: jaikki Date: January 2, 2004 at 00:50:28 Pacific
Reply:
I need to do this automatically in dos batch file using wildcards or something. I dont know what filenames are so that doesnt help me. if i rename 123456789.pdf to 123456-789.pdf using command rename *.pdf ??????-???.pdf the result file is named 123456-89.pdf, 7 is replaced by -, i dont what it to be replaced.
0
Response Number 3
Name: x86 Date: January 2, 2004 at 04:02:40 Pacific
Reply:
THERE IS NO M$DOS IN THE NT FAMILY PLEASE POST IN PROGRAMMING FORUM:
NT COMMAND PROMPT COMMANDS: http://download.sis.com/index_step3.php
0
Response Number 4
Name: Wengier Date: January 2, 2004 at 07:03:15 Pacific
Reply:
Webmaster's words:
"DO NOT ask questions regarding the DOS "command" prompt for Windows NT, 2000 or XP on this forum. Use the Windows NT, 2000 or XP forum, respectively.
All DOS scripting questions must be directed to the Computing.Net Programming Forum."
0
Response Number 5
Name: Mick C Date: January 2, 2004 at 10:41:17 Pacific
For NT Batch Programming please re-post in the NT or Programming Forums
0
Response Number 6
Name: joe-g Date: January 4, 2004 at 20:48:50 Pacific
Reply:
In any case, somebody here does not know that the DOS filename format is: "filename.ext" ....After all, if you can't count, why use a computing machine?
Summary: I think you'd be better off taking the files you wish and put them in a file by name and date. Then use rename and for next to use list to perform. Be sure to be in correct path. like dir > file.txt ...
Summary: hello. i want to rename a file or folder under windows via a batchfile. how do i rename a folder and insert a space in it? for example: "ren c:\affe af fe" doesnt work :( i want the folder to look lik...
Summary: You did not try very much. The obvious solution that comes to mind is: For %%i IN (????.*) DO RENAME %%i N%%i But then it gets interesting..... ...