Hi James, welcome.
jamestyler58 wrote:Hi,
I have created a command line to rename some files and it works great.
I put the command line into a bat file and it doesn't
The command is
BRC32.exe /PATTERN:"*.TXT" /APPENDDATE:C:S:::10:"%d%b%Y" /EXECUTE
in a cmd window this returns YAEPF19MAY2010.TXT
in a bat file this makes no changes, but the data on screen shows YAEPFbU.TXT
can anyone point out what I have done wrong?
Thanks
James
Write PAUSE as last command in your batch file, then you will see what happens:
the "%" sign is an DOS-Batch meta-char an thus have to be escaped by an another %
That means: double the %'s to %%
Other way your real command from batch would look like:
BRC32.exe /PATTERN:"*.TXT" /APPENDDATE:C:S:::10:"dbY" /EXECUTE
Try this batch:
BRC.cmd
- Code: Select all
@ECHO OFF
BRC32.exe /PATTERN:"*.TXT" /APPENDDATE:C:S:::10:"%%d%%b%%Y" /EXECUTE
PASUE
HTH?
And, BTW, i have seen that PATTERN is case sensitive?
/PATTERN:"*.TXT" didn't works for my "test.txt" files... (but for "test2.TXT")... i have to use /PATTERN:"*.txt" ?