How to set .bat path

1

Well my problem is the following I want to run a .bat file that will:

  • create a folder locally
  • copy images from my server to the created folder
  • hide the created folder

But it ends up displaying this message:

C:\Wallpaper especifica um nome de arquivo
ou de diretório no destino 
(F = arquivo, D = diretório)?

How do I set C: \ Wallpaper to Directory

My code is as follows:

XCOPY /E "[caminho do servidor]" "C:\Wallpaper"
attrib +h "C:\Wallpaper"
    
asked by anonymous 15.10.2018 / 19:03

1 answer

1

I just got into "File Explorer" and looking at how it sets folders and noticed that it puts a "\" at the end when it's a folder ...

So I just had to put a backslash on the first line:

XCOPY /EY "[caminho do servidor]" "C:\Wallpaper\"
attrib +h "C:\Wallpaper" 
    
15.10.2018 / 19:03