0

I'm trying to execute a basic query from command prompt below and always got the response as " The filename, directory name, or volume label syntax is incorrect. 0 file copied.

copy /y “C:\Users\tdnguyen\Desktop\Source_File\*.*” “C:\Users\tdnguyen\Desktop\TAN\”

1 Answers1

0

Use XCOPY instead. See this question copying all contents of folder to another folder using batch file?

xcopy /s /y "C:\Users\tdnguyen\Desktop\Source_File" "C:\Users\tdnguyen\Desktop\TAN"
Peter
  • 1,006
  • 7
  • 15
  • Thanks. I fixed it as you said and the code went through. – Tan Nguyen Oct 02 '17 at 20:00
  • I have a full code to copy files in listed txt file to another folder as below. However, I got an error came back as "%%I was unexpected at this time." and " File not found - %%I*" for /f "delims=" %%i in (C:\Users\tdnguyen\Desktop\Filelist1.txt) do ( xcopy /s /y “C:\Users\tdnguyen\Desktop\Souce_File\%%i*” “C:\Users\tdnguyen\Desktop\TAN\” ) – Tan Nguyen Oct 02 '17 at 20:03
  • Maybe you can put that in another question. Asking questions in the comments sections defeats the purpose of StackOverflow – Peter Oct 02 '17 at 20:09