嘿,所有我一直在创建一个.bat文件来随机选择一个文件,在这种情况下.jpg文件,然后被移动到它们将在电视上显示的位置。
电视从随机拍摄的照片中抓取最新图像。
我的问题是如何将“thouch”与现有的代码进行互操作?
@echo off
:LOOP
setlocal EnableDelayedExpansion
cd C:\Users\bruce\Desktop\Test
set n=0
for %%f in (*.*) do (
set /A n+=1
set "file[!n!]=%%f"
)
set /A "rand=(n*%random%)/32768+1"
copy "!file[%rand%]!" \\server\TV\NoticeBoard
timeout /t 50
goto :LOOP
答案 0 :(得分:0)
....
copy /b "!file[%rand%]!"+,,
copy "!file[%rand%]!" \\server\TV\NoticeBoard
....