BRC output/output path

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

BRC output/output path

Postby clearone » Fri Jun 04, 2010 12:24 am

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...
clearone
 
Posts: 2
Joined: Fri Jun 04, 2010 12:07 am

Re: BRC output/output path

Postby Stefan » Fri Jun 04, 2010 7:51 am

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? :D


HTH? :D
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: BRC output/output path

Postby clearone » Fri Jun 04, 2010 5:23 pm

Hi Stefan,

Yah, I am not that familair with DOS commands so thanks for the suggestions. This will give me more options to play with when making my batch processing.
clearone
 
Posts: 2
Joined: Fri Jun 04, 2010 12:07 am


Return to BRC Support