Can't copy files to UNC Destinations if BAT file is called via scheduled task

后端 未结 5 1687
无人共我
无人共我 2021-02-02 01:52

I have a bat file copying files from current machine to mapped network drive (one line, xcopy command).

It works when I RDP to server. However, when I run as a schedule

5条回答
  •  攒了一身酷
    2021-02-02 02:19

    It's possible to copy files to a UNC path without mapping as a network drive. Just try to set the UNC path in quotes.

    copy * "\\server\share"
    

    Without the quotes, i got a "syntax error" running on Windows7 command line.

提交回复
热议问题