Batch file request

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

VIP_EJC

Thread Starter
Joined
Aug 21, 2007
Messages
158
I need a batch file that will convert the name of a parent folder and all subfolders and files from lowercase to uppercase.

Example

Parent folder = PARENT FOLDER
File = FILE1.FEX
Subfolder = SUBFOLDER
File = FILE2.FEX

Does anybody know the syntax to create it?
 

Ent

Josiah
Trusted Advisor
Joined
Apr 11, 2009
Messages
5,467
Do you specifically need this to be a batch file? I suspect I could do this for you in visual basic script but batch doesn't do string manipulation very well at all.
 
Joined
May 22, 2005
Messages
7,091
I don't know if it's possible with a batch file, but it's pretty simple with a mass renaming program.

There are many of them out there, the one I prefer is Rename Master.
 

VIP_EJC

Thread Starter
Joined
Aug 21, 2007
Messages
158
Yes, it must be a batch file for Windows XP. The closest batch file I could find is this, but it's for lowercase. Go figure. Can anybody edit it to uppercase?

To rename all the files names in a directory, use:

[call] LwrCase_Folder FullyQualifiedDirectoryName [/S]
where FullyQualifiedDirectoryName is the fully qualify folder path, and /S is an optional parameter that will also rename files names in all sub-folders.

@echo off
if {%1}=={} @echo Syntax: LwrCase_Folder FullyQualifiedDirectoryName&goto :EOF
if not exist %1 @echo LwrCase_Folder - %1 NOT found.&goto :EOF
setlocal
for /f "Tokens=*" %%a in ('@echo %~a1') do (
set folder=%%a
)
if /i "%folder:~0,1%" NEQ "d" @echo LwrCase_Folder - %1 is NOT a folder.&endlocal&goto :EOF
pushd %1
set sw=/B /A /A-D
if /i {%2}=={/S} set sw=%sw% %2
for /f "Tokens=*" %%f in ('dir %sw%') do (
call LwrCase "%%f"
)
popd
endlocal
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top