Computing.Net > Forums > Windows XP > bat file

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.

bat file

Reply to Message Icon

Name: ed123456789
Date: September 3, 2004 at 06:47:20 Pacific
OS: xp pro
CPU/Ram: p4/512
Comment:

how to create a bat file that renames folder
on the c drive c\program files\new folder

i want to rename new folder



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: September 3, 2004 at 07:06:10 Pacific
Reply:

To rename a Folder under XP use the Move command at prompt.

To know more type Move /? and embed your path between quotes (") if that contains blanks (e.g. "C:\program files\new folder").


0

Response Number 2
Name: salgolf
Date: September 3, 2004 at 09:04:22 Pacific
Reply:

It's a lot easier to open Windows Explorer, find the folder you want to rename, right click on it, go to Rename...and, well, rename it.


0

Response Number 3
Name: XpUser
Date: September 3, 2004 at 09:22:59 Pacific
Reply:

Yes I agree with salgolf that Windows Explorer will do just that but do not rename any folder installed by a program. If you do, you may run into awful lot of problems.

i_XpUser


0

Response Number 4
Name: salgolf
Date: September 3, 2004 at 10:19:45 Pacific
Reply:

XP is right. I should have said that, although many folders can be renamed without issue. I have a My pix folder with lots of subfolders. I could change any of those without causing a problem.

On the other hand, I wouldn't try renaming Windows/Sytem32! LOL


0

Response Number 5
Name: ed123456789
Date: September 3, 2004 at 14:17:46 Pacific
Reply:

yes but what if this guy need to do this on 500 pc's


0

Related Posts

See More



Response Number 6
Name: salgolf
Date: September 3, 2004 at 17:56:36 Pacific
Reply:

Dunno. Maybe he has 500 workers he can instruct. Interesting question.


0

Response Number 7
Name: BCW
Date: September 7, 2004 at 17:12:02 Pacific
Reply:

make a txt file in your route directory (c:)
in the txt file type :-
rename c:\progra~1\newfol~1 mynewfolder

save and rename to .bat rather than .txt run it , it will rename "new folder" to mynewfolder << change this to what u want.

ok couple of things to note:-
1: only 8 characters allowed if its longer than 8 then u have to have 6 + ~1 hence program files becomes progra~1
2: spaces do not count hence new folder becomes newfol~1 << space taken out still longer than 8 so 6 characters used and ~1 added to the end.

the 8 characters does not seem to count for the new name but im not sure how to get a space in it hence mynewfolder rather than my new folder.

must admit r/click and rename in windows is alot easier unless you specifically need this way :).


0

Response Number 8
Name: BCW
Date: September 7, 2004 at 17:21:43 Pacific
Reply:

whoops ok showing my age and the old dos techniques lol. typing this in the batch file also works.

rename "c:\program files\new folder" "my new folder"

looks clearer plus it gives you your spaces if needed in the new name.

erm can you not edit your posts on this forum, cant see an option anywhere ?


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: bat file

Hyperlink to .Bat file w/ parameter www.computing.net/answers/windows-xp/hyperlink-to-bat-file-w-parameter/142375.html

bat files that delete folders on C: www.computing.net/answers/windows-xp/bat-files-that-delete-folders-on-c/114070.html

Autoexec.bat File www.computing.net/answers/windows-xp/autoexecbat-file/59996.html