Win7 "Unable to change Attribute" on a decrypted USB HDD

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

For some reason files are not being backed up from my daily backup drive Y: to my weekly backup drive Z:.
Perhaps the Archive bit is not set on the source drive Y:

Code: Select all

Y:\>attrib -s -h -r +a *.* /s /d
Access denied - Y:\System Volume Information
I decide to set ON all Archive bits on the source drive Y:, reasoning that this should ensure that whatever is on the source drive Y should be copied to the target drive, weekly Z:
The message "Unable to change Attribute" appears from the ROBOCOPY command run.
attrib_00.png
The CMD ATTRIB fails with an "Access denied" Windows message.
attrib_01.png
So from Windows Explorer I go to inspect and set the Attribute bit for a specific file "46.DOT"
I check ON the checkbox and choose OK ...
attrib_02.png
... And Win7 falls back on the tried and trusted message "An error occurred".

Perhaps my USB HDD is failing. I have had it for, I'd say, 15 years, running it once a night. Once a night doesn't sound like a lot, but presumably I am "touching" every sector of the file structure, through and through, every night. Maybe that counts as wear and tear.
And before you suggest it, I assure you that in all this time I have dropped it twice or thrice; perhaps more.

I have a spare, new SDD external that I can use, but then I suspect that the problem on the old Y: drive (HDD) will mean a failure to copy some files to my new nightly backup (SDD).

I'd like to know of a more powerful way to interrogate and set Attribute bits, or perhaps to fix all problems in a file and directory table - probably a 3rd-party application.

Thanks, Chris
You do not have the required permissions to view the files attached to this post.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
StuartR
Administrator
Posts: 12695
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by StuartR »

Can you try your attrib command again, using a command prompt that you start with right click and "Run as administrator"
StuartR


User avatar
stuck
Panoramic Lounger
Posts: 8282
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by stuck »

    I've never had the need to poke at file attributes in a big way but when I was working I did use this utility called Attribute Changer:
https://www.petges.lu/
to touch the read-only attribute of files and folders on our team's main network folder. I did that as a simple way of locking the folders and files associated with each report we produced when it completed, which meant I was doing that several times a week.

I used it in preference to the option built in to Windows (via RIGHT click and select Properties) because, unlike that option, it would touch the read-only attribute of a folder and (because I'd hammered home to everybody that File Explorer was the only way to stay sane when navigating our huge hierarchical folder structure) having the folders also set to read-only meant you could see at a glance which bits of our folder structure were 'finished'.

It was simple to use via a RIGHT click on a file / folder and selecting 'Change Attributes'. Also, messing with the file attributes like this never caused any problems with the corporate IT backup systems.

Ken

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

StuartR wrote:
17 Jun 2024, 09:57
Can you try your attrib command again, using a command prompt that you start with right click and "Run as administrator"
Thank you Stuart. The short answer is "yes".
Now I believe I ran the first CMD in Administrator mode, but I see that the title bar was trimmed off on account of the flood of messages.

attrib_03.png
So here I am in Administrator mode with the same error message.
There is no list of "Unable to change Attribute" messages this time because I am not running RoboCopy.
attrib_04.png
But I can go through Windows7 Explorer and see that the attribute bit is now turned on (Hooray :clapping:).
Not only that, but I can re-enter properties, turn OFF the attribute bit and "Apply", then re-enter and turn the Attribute bit back ON.

After posting this I will try running (a) the daily backup again and then (b) the weekly backup, both in Administrator mode.

I don't know how long I've NOT been backing up some files; there may be critical files from a year ago that I have assumed are backed up, that haven't been

:thankyou: Thanks again for your suggestion. I will report back soon.
(signed) "I hate computers" of Bonavista
You do not have the required permissions to view the files attached to this post.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

stuck wrote:
17 Jun 2024, 10:11
    I've never had the need to poke at file attributes in a big way but when I was working I did use this utility called Attribute Changer:
https://www.petges.lu/
Thank you Ken. I have d/l "Release 11.30b 6 April 2024 / Windows 7, 8, 10, 11 and 11" (5,596 KB) and will look at it after I've re-essayed with Administrator mode on my RoboCopy Batch file.

I am a big fan of 3rd-party software, but at the same time I am usually keen (as distinct from Ken( :groan: )) to find a way within Windows to get things done, no matter how cumbersome, so that I can help folks who have only-Windows; or who are not allowed to install software.

Years ago, when the world belonged to us, I used a lovely DOS application Touch.com. My copy is timestamped 10/27/1988.
And is a mere 1,021 bytes.

Cheers, and Thanks
Chris
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

StuartR wrote:
17 Jun 2024, 09:57
Can you try your attrib command again, using a command prompt that you start with right click and "Run as administrator"
Stuart, the batch file is running. In the meantime ...
attrib_05.png
... I set the "Run as Administrator" bit on the shortcut, Applied, and then went back and inspected THAT bit to be sure it was was switched ON. And it is. :crossfingers:
Cheers, Chris
attrib_06.png
You do not have the required permissions to view the files attached to this post.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

yay :clapping: :clapping:
attrib_07.png
And not only that, but my old photographs have appeared:-
attrib_08.png
Yay Stuart!
Now to simulate my weekly backup and see if that DOT and those photos appear on my Z: drive - the Sunday-night weekly accumulative backup.
Thanks again - again :grin:
Cheers, Chris
You do not have the required permissions to view the files attached to this post.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

ChrisGreaves wrote:
17 Jun 2024, 11:19
Now to simulate my weekly backup and see if that DOT and those photos appear on my Z: drive ...
The 46.dot is present, so it has been backed up through the daily Y: drive to the weekly Z: drive.
attrib_09.png
The early images are on that Z: weekly drive.
Also the MSWord document I edited until 11:00 a.m.

Thanks Stuart.
Now, for bonus points: Why should running the batch file in Administrator mode make such a difference? It is clear to me (because I looked) that most of my daily files (documents, PNGs, XLS and so on) are being copied across. Yet some of those photos, and that 46.dot was NOT being copied.
I assume the failure was because the ATTRIBUTE bits were set to Archive=OFF
AND that I was unable to reset them by what I think of as a normal channel - Windows Explorer.

It seems as if Admin-mode makes all the difference.

I have left my backup batch file to run in Administrator for now.
Cheers, Chris
You do not have the required permissions to view the files attached to this post.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
stuck
Panoramic Lounger
Posts: 8282
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by stuck »

ChrisGreaves wrote:
17 Jun 2024, 16:00
...I assume the failure was because the ATTRIBUTE bits were set to Archive=OFF
AND that I was unable to reset them by what I think of as a normal channel - Windows Explorer...
Attribute Changer will let you set/unset the 'A' (archive) attribute (and any other attribute) via a RIGHT click in Windows File Explorer, no Admin rights required.

Ken

User avatar
StuartR
Administrator
Posts: 12695
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by StuartR »

Nice to see it fixed
StuartR


TobyAdam
NewLounger
Posts: 1
Joined: 18 Jun 2024, 22:19

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by TobyAdam »

I was having the same issue.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15858
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Win7 "Unable to change Attribute" on a decrypted USB HDD

Post by ChrisGreaves »

TobyAdam wrote:
18 Jun 2024, 22:29
I was having the same issue.
Hi Toby, and welcome aboard.
Are you now able to fix the issue by using Stuart's suggestion to "Run in Administrator mode"?

If not, what remains an issue for you?
Cheers, Chris
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed