Could you tell me how to mark folders for non-deletion??

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

Could you tell me how to mark folders for non-deletion??

Post by Alpha_AI » Wed Aug 13, 2008 11:19 am

I would like to find out how to mark folders as read only, meaning unable to be deleted.
Any one knows how?

Ben

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Aug 13, 2008 1:59 pm

You can use the DOS command ATTRIB to mark folders as hidden and read only.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

Post by Alpha_AI » Wed Aug 13, 2008 2:09 pm

Ive already tried that.
It doesnt stop it from being deleted though.

I can mark it readonly buT I can also delete it afterwards

I use

attrib +R /S /D C:\foldername
and I can still delete it afterwards.

No probs, im still looking
Thanks anyways

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Aug 13, 2008 5:04 pm

Windows Explorer doesn't care about the read only flag, it will delete it. Try marking it as a system file.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Aug 14, 2008 12:41 am

Did you try making it hidden per my original reply?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts