Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的情况。我需要将所有文件从某个目录(每天都会发生变化)移动到一个静态不变的目录中。如何创建一个脚本来获取该新目录名称,将其放入变量中,然后使用该目录变量将文件移动到静态目录?
谢谢
@echo off move "%~1\*.*" "\Static\Dir" /Y
将更改目录的名称作为批处理文件的参数;如果名称可能包含空格,请将其括在引号中:
test.bat "The dir of today"