试下咯
删除文件夹什么的循环里面自己加了吧?
上次我批量更新SD卡,是用 mountvol 命令卸载卷标……不过那个
是一个个来的。
@echo off
set src=d:\MP4
::指定源MP4媒体文件所在路径。
set feature=视频\演示.avi
::指定一个将被复制的文件的相对路径作为判断的依据
:main
for %%a in (G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a: (
if exist "%%a:\%feature%" (
echo 磁盘%%a: 已经有媒体文件了
) else (
echo 磁盘%%a:
xcopy /s /f /d "%src%\*" "%%a:\"
)
)
)
ping -n 2 127.0.0.1>nul
goto :main
pause
Last edited by 523066680 on 2010-10-17 at 16:11 ]
Give it a try.
Add the loop for deleting folders yourself?
Last time I batch updated the SD card, I used the mountvol command to unmount the volume label... But that was one by one.
@echo off
set src=d:\MP4
:: Specify the path where the source MP4 media files are located.
set feature=视频\演示.avi
:: Specify a relative path of a file to be copied as the basis for judgment
:main
for %%a in (G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a: (
if exist "%%a:\%feature%" (
echo The disk %%a: already has media files
) else (
echo The disk %%a:
xcopy /s /f /d "%src%\*" "%%a:\"
)
)
)
ping -n 2 127.0.0.1>nul
goto :main
pause
Last edited by 523066680 on 2010-10-17 at 16:11 ]