我制作了一个脚本,用于将文件从本地计算机上的文件夹移动到网络驱动器,但我似乎无法让它工作。
move c:\Sourcefoldernam\*.* \\homeserver\e
我是否遗漏了要移动到网络驱动器的文件?
答案 0 :(得分:1)
也许你错过了反斜杠
试
移动c:\ Sourcefoldername \ *。* \\ homeserver \ e
答案 1 :(得分:0)
以下是我们在工作中为我们的网络位置所做的工作
REM Do a net use command just to see what's mapped
net use
REM Delete all network connections before we start
net use * /del /yes
REM Do another net use to make sure the connections are gone
net use
REM Map network connections to use in the script
net use S: \\folder\dir password /USER:user /persistent:no
net use T: \\folder\dir /persistent:no
REM Run the net use command to make sure everything is mapped correctly
net use
REM set the sourcedir variable to point to the directory you want to send it to
set sourcedir=S:
REM set the destdir variable to point to the mapped directory
set destdir=T:\folder\sub-folder\directory
move %sourcedir%\W* %destdir%\
REM Clean up by deleting all network connections before ending
net use * /del /yes
REM Run the net use command to make sure everything is disconnected
net use
答案 2 :(得分:0)
您需要放置整个路径,并且*足够
move [source folder] [destination folder]
move C:\sourcefolder\* Y:\sourceDestination