简体   繁体   English

程序将解锁的文件移动到新文件夹

[英]Program to move unlocked files to an new folder

i need something that will move files from one folder to another network location, but leave any locked files that are currently being written to! 我需要将文件从一个文件夹移动到另一个网络位置的东西,但保留当前正在写入的所有锁定文件!

any ideas? 有任何想法吗?

apols i am no developer, but i have been trying to use Apols我不是开发人员,但我一直在尝试使用

ROBOCOPY C:\\test c:\\test\\q /move /R:0 /W:0 机器人C:\\ test c:\\ test \\ q / move / R:0 / W:0

but even if i open a file, it still moves it to the new directory 但是即使我打开一个文件,它仍然会将其移动到新目录

mal 发作

You can use for %%f in (*) do move %%f destination\\%%f (in a batch file) and just allow each individual invocation of move to fail, watching the errors scroll by. 您可以for %%f in (*) do move %%f destination\\%%f (在批处理文件中) move ,并且仅允许对move每个单独调用失败,并观察错误的滚动。

There are also options for making for %%f work recursively, though that's a bit involved. 还有一些使for %%f递归工作的选项,尽管有点麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM