BRC does not set RA attributes

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

BRC does not set RA attributes

Postby Blackkatt » Tue Dec 03, 2013 11:31 am

Hi, there's a bug with BRC! (latest version)

When trying to set RA attributes. They are not set if

Code: Select all
%BRC% /dir:%1 /recursive /nofolders /setr /pattern:"*.nfo.*" /EXECUTE

Only if...
Code: Select all
%BRC% /dir:%1 /recursive /nofolders /removename /setr /pattern:"*.nfo.*" /EXECUTE

update, this also works...trying them all so i'll update as I go :mrgreen:
Code: Select all
%BRC% /dir:%1 /recursive /nofolders /STRIPSYMBOLS /setr /pattern:"*.nfo.*" /EXECUTE

this one i can live with so it's not hurry any more :wink:
Code: Select all
%BRC% /dir:%1 /recursive /nofolders /STRIPSYMBOLS /setr /pattern:"*.nfo.*" /PREFIX:_DEL_ /EXECUTE


witch cases a hole bunch of other issues, :cry:

PS: Did send a e-mail as well, as i need fast fix "support" :)
Last edited by Blackkatt on Wed Dec 04, 2013 7:42 am, edited 1 time in total.
Blackkatt
 
Posts: 8
Joined: Tue Dec 03, 2013 11:28 am

BRC only sets attributes of renamed files

Postby truth » Wed Dec 04, 2013 1:41 am

BRC wont set a file-attribute, unless theres a resultant OrigFilename change.
The following commandline suffices for your NoRename examples:

Forfiles /p%1 /s /m *.nfo /c "cmd.exe /c attrib +r @file"
It wont touch hidden *.nfo's (presumed, since /InclH omitted from all BRC params)
You may need to edit /p%1, depending on where you test from (command-prompt/regedit/batch)

I guess you could always run 2 consecutive BRC commands, something like:
BRC /dir:%1 /recursive /inclh /nofolders /pattern:*.nfo /setr /suffix:RRR
BRC /dir:%1 /recursive /inclh /inclr /nofolders /pattern:*RRR.nfo /regexp:(.*)RRR$:\1:

Alot of the above depends on whether-or-not you have hidden *.nfo's? Disregard unless needed.
I've a feeling the author intended this behavior, Im unaware of versions that behave differently.
truth
 
Posts: 104
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionBelt, MilkyWay

Re: BRC does not set RA attributes

Postby Blackkatt » Wed Dec 04, 2013 7:40 am

truth wrote:BRC wont set a file-attribute, unless theres a resultant OrigFilename change.
The following commandline suffices for your NoRename examples:

Forfiles /p%1 /s /m *.nfo /c "cmd.exe /c attrib +r @file"
It wont touch hidden *.nfo's (presumed, since /InclH omitted from all BRC params)
You may need to edit /p%1, depending on where you test from (command-prompt/regedit/batch)

I guess you could always run 2 consecutive BRC commands, something like:
BRC /dir:%1 /recursive /inclh /nofolders /pattern:*.nfo /setr /suffix:RRR
BRC /dir:%1 /recursive /inclh /inclr /nofolders /pattern:*RRR.nfo /regexp:(.*)RRR$:\1:

Alot of the above depends on whether-or-not you have hidden *.nfo's? Disregard unless needed.
I've a feeling the author intended this behavior, Im unaware of versions that behave differently.


Hi Truth!

I think you missed something, I cannot find files like somename.nfo.1 and so on...I use BRC for that and the sets them to read only so that I can with "del" del all read-only files.

PS! my bad, see that I did not write that in the pattern here, i missed that, its in my other thread due.

Any why should it not be possible to just set file-attribute without changing the name? seem kinda dum :|
Blackkatt
 
Posts: 8
Joined: Tue Dec 03, 2013 11:28 am

BRC only sets attributes of renamed files

Postby truth » Wed Dec 04, 2013 11:13 am

If someone creates two separate posts/problems, I'll treat them as such.
The solutions offer a workaround to your stated problem of only setting attributes of a particular file-match.

As far as why the author may have intended this, I cant say, (perhaps it was designed as a renamer)?
truth
 
Posts: 104
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionBelt, MilkyWay

Re: BRC only sets attributes of renamed files

Postby Blackkatt » Wed Dec 04, 2013 12:21 pm

truth wrote:As far as why the author may have intended this, I cant say, (perhaps it was designed as a renamer)?


Then why have the option? Thx for the workaround :)
Blackkatt
 
Posts: 8
Joined: Tue Dec 03, 2013 11:28 am

BRC only sets attributes of renamed files

Postby truth » Wed Dec 04, 2013 8:51 pm

Probably to give BRC more control over its renames??

Now that I've read both posts, it seems you dont need a workaround:
Forfiles /m *.nfo.? /c "cmd /c if @isdir==FALSE del @file"
It matches filenames ending as .nfo.? & deletes them (no need for attribute-tagging).

In this case, your batchline would be similiar to:
Forfiles /p%1 /s /m *.nfo.? /c "cmd /c if @isdir==FALSE del @file"

Note that I'm still guessing here, because I dont know if .nfo.?? is another possible format to be deleted?
Only you know that, and if you're not willing to clearly state it, thats your choice.
Your other post's codes: 6/7/8 only serve to confuse, not clarify that filename condition, no more guessing for me.
truth
 
Posts: 104
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionBelt, MilkyWay

Re: BRC only sets attributes of renamed files

Postby Blackkatt » Thu Dec 05, 2013 8:22 am

truth wrote:Now that I've read both posts, it seems you dont need a workaround:
Forfiles /m *.nfo.? /c "cmd /c if @isdir==FALSE del @file"
It matches filenames ending as .nfo.? & deletes them (no need for attribute-tagging).

In this case, your batchline would be similiar to:
Forfiles /p%1 /s /m *.nfo.? /c "cmd /c if @isdir==FALSE del @file"


Yes, that works thx. Then Forfiles does not use the same "wildcards" as find and the others, as doing the "same" *.nfo.? won't work OR any other combination I mention in my other thread, witch you've read)
Blackkatt
 
Posts: 8
Joined: Tue Dec 03, 2013 11:28 am


Return to BRC Support