Log only changed files

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

Log only changed files

Postby dustinsaunders » Thu Feb 20, 2014 1:07 am

I have a script that invokes the BRC for doc name scrubbing before moving it into sharepoint (which doesn't allow special characters or trailing periods).

Not sure how to get the command to log only changed files to a text file in case there is a problem. Anyone know how to set this up?
dustinsaunders
 
Posts: 3
Joined: Thu Feb 20, 2014 12:41 am

Log renames only

Postby truth » Wed Feb 26, 2014 4:51 am

BRC has no option to output only renamed files.
I just pipe it thru sed if I need to create such a file.

brc32 ______ /execute|sed --t -n -r s/"Filename (.*) renamed to (.*)/\1\|\2/p">RenamedFiles.txt
It creates an 'undo-file' in the same format as used by BRU's Import Rename Pairs.
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Log only changed files

Postby dustinsaunders » Wed Feb 26, 2014 3:39 pm

Hmm.. never used sed before, but that sounds like it will accomplish what I'm looking for. Appreciate the response truth.
dustinsaunders
 
Posts: 3
Joined: Thu Feb 20, 2014 12:41 am

Re: Log only changed files

Postby truth » Sat Mar 08, 2014 10:57 pm

No problem, you could just pipe through FIND instead:
BRC32 _____ /execute | FIND "renamed to">RenamedFiles.txt
That creates a similiar renamed-log-file (with BRC's exact output-lines)

I prefer sed, since it lets you mod the output-lines, instead of just matching them.
Note SED s/match/replace/ works very much like BRC32 /regexp:match:replace
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay


Return to BRC Support