@kevin Thank you for your help, the above code runs successfully, but the code is long
I want to use the QM code and the BAT code to achieve the same functionality. How do I get the value of the variable %i in QM?
The above code, all use the BAT command, The following code, I want to use the QM+BAT command, the code that needs to supplement the variable i
I want to use the QM code and the BAT code to achieve the same functionality. How do I get the value of the variable %i in QM?
@echo off
for /f "tokens=2,*" %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop"') do (
set desk=%%j
)
set src=1.txt
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a:\nul (
for /f "delims=" %%i in ('dir /s/a/b/a-d "%%a:\%src%" 2^>nul') do (
copy "%%i" "%desk%"
)
)
)
The above code, all use the BAT command, The following code, I want to use the QM+BAT command, the code that needs to supplement the variable i