Batch file same attribute to a folder + all sub folders
Posted: 09 Mar 2011 02:17
I need a batch file to assign the same attribute to a folder and all its sub folders.
Can this be done using an argument or a "wildcard" instead of assigning the attribute to
each sub folder individually? I use XXCopy in my batch files.
Instead of having to do this:
Thanks.
Can this be done using an argument or a "wildcard" instead of assigning the attribute to
each sub folder individually? I use XXCopy in my batch files.
Instead of having to do this:
Code: Select all
attrib +r "D:\My Documents\Main Folder"
attrib +r "D:\My Documents\Main Folder\Sub Folder 1"
attrib +r "D:\My Documents\Main Folder\Sub Folder 2"
attrib +r "D:\My Documents\Main Folder\Sub Folder 2\Sub Folder A "
Thanks.