Page 1 of 1

hide while doing robocopy

Posted: 28 Jul 2013 09:11
by looksthatmatter
i am using the following code which copy all the .pdf file from hard sisk to usb in a folder DATA,
1. i want to hide destination folder "DATA" in usb while i am copying my data from hardisk to USB.
2. the folder should be invisible while the robocopy is running and copying the file.
plz help in changing the below code



for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
if /i not "%%a:"=="%~d0" robocopy %%a:\ *.pdf "%~d0\data\drive %%a" /xd /s
)

Re: hide while doing robocopy

Posted: 28 Jul 2013 11:46
by penpen
Just do:

Code: Select all

attrib +H "%~d0\DATA"
:: insert your code here
attrib -H "%~d0\DATA"

penpen