Here you go, next time explain your questions better
copy /y D:\CDDATA\LIP\APin.dat D:\CDDATA\LIP\Temp\Apconf.dat
Question
I've an issue with copy command I'm using in my script. The command syntax is correct (to the best of my knowledge) but this command displays the error of "Path not found"; although the path is present, the file is also present. Not sure what the issue is. My command:
if exist D:\CDDATA\LIP\APin.dat* (copy D:\CDDATA\LIP\APin.dat* "D:\CDDATA\LIP\Temp\Apconf.dat") else goto exit12
I tried using xcopy instead but it waits for an input while running:
Does D:\CDDATA\LIP\Temp\Apconf.dat specify a file name
or directory name on the target
(F = file, D = directory)?
Tried to suppress it using /C but won't work. Any suggestions??
Thanks in advance, Adil
Solution
Here you go, next time explain your questions better
copy /y D:\CDDATA\LIP\APin.dat D:\CDDATA\LIP\Temp\Apconf.dat
OTHER TIPS
To xcopy to a folder without prompting, end the path with a backslash or use the /I
switch.
"D:\CDDATA\LIP\Temp\Apconf.dat\"
mkdir "D:\CDDATA\LIP\Temp\"
xcopy "D:\CDDATA\LIP\APin.dat" "D:\CDDATA\LIP\Temp\Apconf.dat"/Y/H/v/s
Try making the directory FIRST in xcopy THEN copying the files. That works for me.