脚本将所有文件从一个位置移动到另一个位置 [英] script to move all files from one location to another location
问题描述
有人可以帮我一个DOS脚本从一个位置中的所有文件移动到另一个位置。
移动<源路径方式> \\ *。*< destpath>
IE浏览器,如果你想从C中的所有文件移动:\\测试\\到c:\\ TEST2
招C:\\测试\\ *。* C:\\ TEST2
如果你想用晚餐preSS提示是否覆盖文件
移动/ Y C:\\测试\\ *。* C:\\ TEST2
如果您想从当前目录移动,你可以指定只在 *。*
。你也可以做相对路径。所以,如果你想移动当前目录下的文件,一个目录,你会做
动*。* ..
..
是快捷方式上一级目录
如果是在网络上,你可以使用UNC路径作为你登录的用户进行身份验证或映射驱动器(使用 NET USE
命令)到远程计算机上指定一个用户名/密码,然后复制使用该驱动器盘符。然后,您可以删除驱动器盘符大功告成了。 UNC路径看起来像 \\\\计算机名\\共享\\文件夹\\ file.txt的
can someone help me with a dos script to move all files from one location to another location
move <sourcepath>\*.* <destpath>
IE, if you wanted to move all files from c:\test\ to c:\test2
move c:\test\*.* c:\test2
if you want to suppress the prompt to overwrite files
move /Y c:\test\*.* c:\test2
If you want to move from the current directory, you can specify just the *.*
. Also you can do relative paths. So if you want to move the current directory's files up one directory, you'd do
move *.* ..
..
being the shortcut for "up one directory"
If it's across the network, you can use a UNC path to authenticate as the user you're logged in as or map a drive (using the NET USE
command) to specify a username/password on the remote computer, then copy using that drive letter. You can then delete the drive letter after you're done. UNC paths look like \\computer\share\folder\file.txt
这篇关于脚本将所有文件从一个位置移动到另一个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!