Reputation: 11
I'm trying to make an automated program that copies the Windows Vista Sidebar to the directory it needs to go, but the program says "Invalid Path" and does not copy any files. I have not had this issue with other batch files that copy to a similar directory.
I have placed quotation marks around the directories themselves, and they still do not work. Is there an issue I'm just not seeing with my code?
@ECHO OFF
type "%~dp0\Sidebar\start.txt"
pause
xcopy "%~dp0\Sidebar\Program Files\Windows Sidebar\" "C:\Program Files\Windows Sidebar\" /E /I /Y /S
xcopy "%~dp0\Sidebar\Program Files (x86)\Windows Sidebar\" "C:\Program Files (x86)\Windows Sidebar\" /E /I /Y /S
type "%~dp0\Sidebar\f_copy.txt"
type "%~dp0\Sidebar\finish.txt"
pause
exit
I expect it to copy the files, without error, from the local directory to "C:\Program Files (x86)\Windows Sidebar\"
Upvotes: 0
Views: 850
Reputation: 11
Fixed: Removed a backslash from the directory per another answer I did not see before. (Backslash that trailed the copy FROM directory)
Upvotes: 1