Windows 10 BRC CLI cannot clear file attributes

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

Windows 10 BRC CLI cannot clear file attributes

Postby spellng » Fri Jan 10, 2020 7:37 am

Hi,

I'm running Windows 10 Pro - using a batch file to perform many renaming operations - everything works fine on files I manually name for testing in my test folder.

Nothing gets renamed when I run the batch file on my target folders with lots of files.

I determined that the files have the "archive" attribute checked for some reason - and the folder has a "read-only attribute box checked too.

When I uncheck these boxes and click apply all the files attributes are removed and my batch file works.

I cannot seem to get BRC CLI to remove these attributes.

I tried:

/recursive /clearr /cleara

but the attributes are not removed.

I can't seem to rename any files until the attributes are cleared.

Any help would be great.
spellng
 
Posts: 6
Joined: Fri Jan 10, 2020 12:20 am

Re: Windows 10 BRC CLI cannot clear file attributes

Postby therube » Fri Jan 10, 2020 1:37 pm

What command line are you using?
Are you using INCLR?

Code: Select all
INCLR - Include ReadOnly items (excluded by default)


With that, you do not (necessarily) need to use CLEARR.
(The archive attribute should not be an issue at all.)
therube
 
Posts: 929
Joined: Mon Jan 18, 2016 6:23 pm

Re: Windows 10 BRC CLI cannot clear file attributes

Postby spellng » Fri Jan 10, 2020 4:46 pm

Hi,

Thanks - your solution worked.

This will remove the attributes:

Code: Select all
echo step 1 of 7 remove attributes

brc64.exe /D:"D:" /recursive /inclr /inclh /clearr /cleara /quiet /execute

timeout /t 10


I created a batch file that runs multiple rename operations - the pauses let me see the progress in the explorer window - yes, I am including hidden files.

Thanks again for the great help.
spellng
 
Posts: 6
Joined: Fri Jan 10, 2020 12:20 am

Re: Windows 10 BRC CLI cannot clear file attributes

Postby spellng » Fri Jan 10, 2020 7:17 pm

Hi again,

Sorry, ignore my positive response above - turns out that the /inclr and /clearr switches for brc64.exe cli appear NOT to work on my Windows 10 Pro 1909 machine.

I have created two nested test folders with test files and have explorer showing me the details window with an attributes column.

brc64.exe cli with switch /inclr will NOT rename files that have an R - read only.

brc64.exe cli with switch /inclr /clearr does not remove the read-only attribute.

I cannot use brc64.exe cli to remove the read-only attribute.

The only way I can remove the read-only attribute is to uncheck it in the explorer properties window and then the progress bar appears as all the files get modified.

Once the R attribute is removed renaming works.

I don't remember having this problem the last time I used br64.exe a few months back.

Am I missing something obvious?

Please help.
spellng
 
Posts: 6
Joined: Fri Jan 10, 2020 12:20 am

Re: Windows 10 BRC CLI cannot clear file attributes

Postby spellng » Fri Jan 10, 2020 9:33 pm

Hi,

I think I found a solution - I run the following windows command to flip the attributes to off

Code: Select all
attrib -r D:\stuff_to_rename\*.* /s


I added this line at the beginning of my batch script and it flips all the read-only attributes to off of all files and renaming proceeds to work great - even on all subfolders.

Thanks.
spellng
 
Posts: 6
Joined: Fri Jan 10, 2020 12:20 am

Re: Windows 10 BRC CLI cannot clear file attributes

Postby bru » Sat Feb 01, 2020 9:47 am

Hi, the /Clear and /Set-commands only process after a successful rename.

The command-line you posted doesnt rename anything, so no attributes would change.
I figured for simplicity, you might have omitted the rest of the command?
Can you please confirm?

I've been trying to duplicate using:
brc64 /Recursive /NoFolders /InclH /InclR /ClearH /ClearR /Suffix:-KilledAttributes /Execute
brc64 /Recursive /NoFolders /SetH /SetR /RemoveWords:-KilledAttributes /Execute

Both commands always succeed to clear/set the attributes, but I'm on Win8.1
Thanks.
bru
 
Posts: 62
Joined: Wed Jan 31, 2018 7:35 pm


Return to BRC Support


cron