I found this code on SO. It apparently saves the filenames from multiple selected files from explorer, then when all are saved, launches a second program (or should), passing an array of filenames as commandline arguments. I need this program to run invisibly in the background, then launch C:\\Program Files\\WarpDrive\\copyfile.exe when it has acquired all of the filenames. Is this something that could be translated to VB?
I then have a registry association and a command. In place of C:\\Program Files\\WarpDrive\\copyfile.exe, i want to run Command-Queuer.cmd. Is this possible, and where should i put this file?Code:Command-Queuer.cmd ------------------ @ECHO OFF SETLOCAL :: SETUP PARAMETERS: Control temp file location and delay before running SET QueueFile="%TEMP%\Multi-Item-Queue.txt" SET /A Secs=5 :: MAIN PROGRAM: If the first instance create the queue and wait, otherwise transfer to queue and exit IF EXIST %QueueFile% ( ECHO %* >> %QueueFile% ) ELSE ( ECHO %* > %QueueFile% ECHO Waiting %Secs% seconds for other files to finish queuing then will activate... TIMEOUT /T %Secs% /NOBREAK >nul REM - ADD YOUR CODE HERE TO PROCESS THE QUEUE FILE AS A WHOLE REM - Example: Display popup of all file paths selected: Msg %username% <%QueueFile% REM - ALTERNATIVELY, ITERATE THROUGH EACH LINE OF THE FILE REM - Example: FOR /F "tokens=*" %%Z in (%QueueFile%) DO ( COPY %%Z "C:\Backup" ) :: Delete the queue file when finished DEL %QueueFile% ) GOTO:EOF
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\myactiontoplevel\Shell\myaction_a\Shell\myaction_a1\Comm and]
@="C:\\Program Files\\WarpDrive\\copyfile.exe %1"




Reply With Quote