hide while doing robocopy

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
looksthatmatter
Posts: 10
Joined: 18 Jul 2013 10:38

hide while doing robocopy

#1 Post by looksthatmatter » 28 Jul 2013 09:11

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
)

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: hide while doing robocopy

#2 Post by penpen » 28 Jul 2013 11:46

Just do:

Code: Select all

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

penpen

Post Reply