robocopy transfer file and not folder
Solution 1:
See: Robocopy /?
Usage : ROBOCOPY source destination [file [file]...] [options]
robocopy c:\folder d:\folder transfer_this.txt
Solution 2:
According to the Wikipedia article on Robocopy:
Folder copier, not file copier
Robocopy syntax is markedly different from standard copy commands, as it accepts only folder names as its source and destination arguments. File names and wild-card characters (such as
*.*
) are not valid source or destination arguments. Files may be selected or excluded using the optional filespec filtering argument. Filespecs can only refer to the filenames relative to the folders already selected for copying. Fully-qualified path names are not supported.For example, in order to copy the file
foo.txt
from directoryc:\bar
toc:\baz
, one could use the following syntax:robocopy c:\bar c:\baz foo.txt
Solution 3:
Try inserting a space before the destination, like this:
robocopy "c:\transfer_this.txt" "z: \this.txt"
notice the space after the destination "folder"
z:
.