Hi clearone, welcome.
clearone wrote:Sorry, I tried to read all the topic and readme file but can't find the answer.
Is it possibe to output the rename file from a batch process, say using:
brc32 /dir:c:\test /replacecs:dog:cat /execute
Could the "cat" be output/copy/move elsewhere using a command rather than the rename file stays in c:\test?
Thanks, in advance...
You could try to use
/PREFIX:"Results\" to MOVE the renamed files.
like
brc32 /dir:c:\test /replacecs:dog:cat
/PREFIX:"Results\"/execute
This would result in
c:\test\dog.txt
c:\test\Results\cat.txt
Note that the folder "Results" have to exist as an sub-folder of "C:\test" like "C:\test\Results". Just create the folder on your own.
-------
Of course, if you are familiar with DOS batch language you can create this folder automatically from your BRC batch.
- Code: Select all
@ECHO OFF
REM sub-folder "Results" must exist!
IF NOT EXIST Results\. MD Results
brc32 /dir:c:\test /replacecs:dog:cat /PREFIX:"Results\"/execute
PAUSE
Also then you can use other DOS "tricks" like using /PREFIX:"..\Results\"
But that is an other topic...
Note that DOS has problems handling other then standard english chars.
Also think about using "" quotes if file name or path contain spaces/blanks.
The %-sign is an single % on command line, but has to be double in an batch: %%
The batch *.cmd has to be in the same folder as the files, or you have to adjust the relative paths to absolute ones.
It's still worth to read an good article (wiki?) about how to use the DOS command line.
----
For COPY i would copy the original files first and then rename them.
Again, you can do this with DOS batch commands:
- Code: Select all
@ECHO OFF
REM sub-folder "Results" must exist!
IF NOT EXIST Results\. MD Results
REM first copy files with pattern "dog" to an sub-folder:
for %%x in (dir *dog*) DO copy "%%x" "results\%%x"
REM switch to this folder:
CD results
REM execute BRC:
BRC32.exe /REPLACECi:dog:cat /EXECUTE
PAUSE
Of course, depending on your real file names and renaming pattern this could become more complex.
Maybe its worth to copy the files prior on your own with WinExplorer?
HTH?
