这个用 AutoIt 脚本 做 简单(特别在 循环控制 、目录名称获取、路径拼接 上 )
#include
$src = "E:\1.txt"
$tag = ""
$first = "D:\123"
$second = _FileListToArray($first, "*", 2);
If @error Then Exit
For $i = 1 To $second[0]
$third = _FileListToArray($first & "\" & $second[$i], "*", 2);
If @error Then ContinueLoop
For $j = 1 To $third[0]
$tag = $first & "\" & $second[$i] & "\" & $third[$j]
FileCopy($src, $tag, 1)
Next
Next
简单啊 !
用COPY 命令就好了
就是在建立批处理的时候把要复制的文件目录搞明白就好了!
如 copy e:\1.txt d:\123\a\x
copy e:\1.txt d:\123\B\Y
copy e:\1.txt d:\123\C\Z
copy e:\1.txt d:\123\D\x
意大利0:2落后了。。。。。
@echo off
pushd d:\123
for /f "tokens=*" %%i in ('dir/s/b/ad^|sort /r') do (
if not defined #%%i\ copy e:\1.txt "%%i"
set #%%~dpi=1)