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.
how to rename a directory in DOS
Name: John Date: January 9, 2001 at 13:05:41 Pacific
Comment:
I need a correct syntax for renaming the directory listing. I know how to do this in windows but how it in dos.
I know it something like ren rename
I don't know the correct syntax. I need to rename the directory from c:\tmp to c:\temp
Name: Paul Date: January 9, 2001 at 13:09:12 Pacific
Reply:
rename c:\tmp c:\temp
0
Response Number 2
Name: phil Date: January 9, 2001 at 13:15:04 Pacific
Reply:
Or ren c:\tmp c:\temp If that does not work (and it should) Create a new directory called c:\temp Copy any files over to it Delete the empty directory c:\tmp
0
Response Number 3
Name: Ayexby Date: January 9, 2001 at 13:23:48 Pacific
Reply:
Wrong. The correct syntax for renaming a directory in DOS is: MOVE OLDNAME NEWNAME
0
Response Number 4
Name: W0rm Date: January 9, 2001 at 16:10:12 Pacific
Reply:
god, you're all retarded; you don't use the move command...
ren c:\tmp temp
thats how you rename. for goodness sakes! - W0rm
0
Response Number 5
Name: mr o Date: January 10, 2001 at 01:39:15 Pacific
Reply:
worm i thought you where actually intelligent. Why dont the people who answer the post's actually try it out on there own machine before they post the answer
its move olddir newdir
like AYEXBY says...
0
Response Number 6
Name: Mick C Date: January 10, 2001 at 13:48:46 Pacific
Reply:
Why not try both yourself, Mr o (& W0rm) They all will do the job!
REN TMP TEMP RENAME TMP TEMP MOVE TMP TEMP
Only differance is that MOVE gives you a confirmation.
C:\>move tmp temp C:\>tmp => C:\temp [ok]
0
Response Number 7
Name: Ayexby Date: January 10, 2001 at 16:07:08 Pacific
Reply:
Dos 6.22 + earlier will not rename a directory with ren or rename. Later versions may, but I haven't yet sucked on that particular nipple.
0
Response Number 8
Name: Mickey Date: January 11, 2001 at 04:31:56 Pacific
Reply:
I haven't use DOS for a while but if I remember right RENAME renames a file and RENDIR renames a directory.
Name: Mick C Date: January 11, 2001 at 13:01:35 Pacific
Reply:
Ayexby, You are correct, REN does not work with MS-DOS 6.22 I made the mistake of testing it on my main PC with 98se (MS-DOS 7.01) in Real Mode, where it does work! MOVE seems to be OK in 6.22. Mickey, RENAME is the same command as REN, and RENDIR does not seem to be a valid command in both versions, I checked my MS-DOS 5.0 Users Guide and cannot find it listed there. I also typed Help RENDIR at the MS-DOS 6.22 and did not find a match.
So my revised advice for all MS-DOS versions is:
Use MOVE to rename Directories And REN to rename Files
Summary: How to create a directory in DOS with its name as Month. It should pick from date, dynamically say if the date is 24-02-2009 it should create a directory by picking the month as "Feb" help me in this ...