To avoid this 'issue' you must change the folder's system attributes.
First we define our original and destination folders.
set oldp=[define original folder here]
set newp=[define destination folder here]
Then we set the h (hidden) and s (system) attributes off (-h -s), move the folder, and switch the attributes back on again (+h +s).
attrib -h -s %oldp%
move %oldp% %newp%
attrib +h +s %newp%
You can also change all the file attributes within the folder, by using the /S modifier. And all (sub-)directories by using /D.
For instance:
attrib -h -s %oldp% /S /D
Will switch off the hidden and system attributes for (sub)folders and files in the %oldp% folder.
The same sort of thing happens with xcopy.
If you want to use xcopy on hidden/system files you must add the correct modifiers like so:
set oldp=[define original path here]
set newp=[define destination here]
xcopy %oldp% %newp% /H /S
Or only "visible" files will get copied.
I would love any additional input you may have about this.
Thoughts?
No comments:
Post a Comment