2

I want to move a file from one server to another but getting error while using the below command

If Exist "D:\pkr\test.txt" %_ff%forfiles /p "D:\pkr\" /m "test.txt" /c "cmd /c echo @file && move /y @file "%cd%Appldata\pkr" " >> %_LOGG%   

error msg: invalid argument/optional - '@file'

Magoo
  • 77,302
  • 8
  • 62
  • 84
  • Remove the ending backslash in the path switch: `/p "D:\pkr"` or add a dot: `/p "D:\pkr\."`. More information [here](http://stackoverflow.com/a/25841519/2861476) – MC ND Feb 16 '17 at 06:46
  • Why such a complicated command to just move a file. I see no reason to use the `FORFILES` command at all. – Squashman Feb 16 '17 at 14:58
  • With `forfiles`, you cannot use quotes within quotes; replace the inner quotes with `0x22`... – aschipfl Mar 14 '17 at 23:04

0 Answers0