On some Windows environments (Windows 7 and Windows Vista), I have some scripts running and one of the things those scripts are doing, is trying to copy files. The results of those commands are logged in a logfile.
While looking into that logfile, I've just seen the following result:
The system cannot find the path specified.
This obviously is not very helpful (which file does he try to copy, to which directory, ...), so I would like to replace the existing
copy commands by
xcopy or other commands (in order to use the
xcopy /F flag, which shows all files and directories of the
xcopy command), but there is a catch: when I simply replace
xcopy then the non-existing directory gets created, which I don't want (and I don't find a
xcopy flag to prevent this), so now my question becomes:
Is there a commandline command which tries to copy a file to a directory, which shows the files/directories he's copying but which does not create a destination directory in case it does not exist?