Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use the QM code to achieve the following CMD code effect
#3
@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? Huh



Code:
Copy      Help
@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


Code:
Copy      Help
@echo off
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 (
       !!!!! Some code  【i%】
   )
)
)

cop %i "$Desktop$"


Messages In This Thread
RE: How to use the QM code to achieve the following CMD code effect - by win - 01-20-2019, 12:32 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)