basic rename file.exe to same as the fold it is in

Post any Bulk Rename Command support requirements here. Open to all registered users.

basic rename file.exe to same as the fold it is in

Postby akieal » Tue Nov 15, 2011 3:54 am

Hi

All I want to do is rename PATCH.exe to be renamed to the foldername its in eg: \TEST\PATCH.EXE
And make my script renames it to TEST.exe
Here is what I have done (simplified example):

I have a file "PATCH.EXE" that is in a folder \test\

so I created a file in notepad named "SCRIPT.BAT" and added the command to the SCRIPT.BAT:

BRC32 /PATTERN:"PATCH.EXE" /REMOVEFIRSTN:5 /APPENDFOLDER:S::1 /EXECUTE

but when I run my SCRIPT.BAT it just outputs the following and does not rename my PATCH.exe:

Processing Folder C:\TEST\

Help please! What is wrong with my script.

Thank you :cry:
akieal
 
Posts: 2
Joined: Tue Nov 15, 2011 3:44 am

Re: basic rename file.exe to same as the fold it is in

Postby akieal » Tue Nov 15, 2011 4:56 am

Not to worry I figured it out, my script was not working because of my match pattern seems to be cause sensitive.

Once I changed it from this:
Code: Select all
BRC32 /PATTERN:"PATCH.EXE" /REMOVEFIRSTN:5 /APPENDFOLDER:S::1 /EXECUTE


to this:
Code: Select all
BRC32 /PATTERN:"PATCH.exe" /REMOVEFIRSTN:5 /APPENDFOLDER:S::1 /EXECUTE


It worked!

Thanks :D
akieal
 
Posts: 2
Joined: Tue Nov 15, 2011 3:44 am

Re: basic rename file.exe to same as the fold it is in

Postby Admin » Wed Nov 23, 2011 4:30 am

Thank you for posting the solution! :D
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRC Support