Take a look at:
That helped to explain what is responsible for what. Thanks.
I did manage to develop a simple, working system that will pass along
the names of all selected files to a batch file. The only thing that
that I didn't bother to build in to it was either a safety check that
limits the batch file to only 1 active instance, or a method of using
more a different temp file for each simultaneous batch file instance.
But I am the only person that will be using this, so I won't bother
with it for now.
======= Start Contents of Registry Entry =======
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell]
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Custom Context Menu
Item]
@=""
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Custom Context Menu Item
\Command]
@="C:\\Windows\\system32\\cmd.exe /k call \"C:\\Program Files\\+ Batch
Files +\\01\\New.bat\" \"%1\""
======= End of Registry Entry ============
====== Start Contents of New.bat ===========
set Temptxt="C:\Program Files\+ Batch Files +\01\temp.txt"
if exist %Temptxt% (
echo %1 >> %Temptxt%
exit
) else (
echo %1 > %Temptxt%
ping 127.0.0.1 -n 2
call :CheckTempFileSize
call
rocessFileList %Temptxt%
del %Temptxt%
set Temptxt=
)
goto :eof
:CheckTempFileSize
call :SetTempFileSizea %Temptxt%
ping 127.0.0.1 -n 2
call :SetTempFileSizeb %Temptxt%
if %TempFileSizea%==%TempFileSizeb% (
set TempFileSizea=
set TempFileSizeb=
goto :eof
) else (
call :CheckTempFileSize
goto :eof
)
:SetTempFileSizea
set TempFileSizea=%~z1
goto :eof
:SetTempFileSizeb
set TempFileSizeb=%~z1
goto :eof
rocessFileList
cd "%~dp1"
for /f "tokens=*" %%G in (%~nx1) do (
set WorkingFile=%%G
call :Actions01 %%G
)
goto :eof
:Actions01
// Do stuff with %1
====== End of New.bat ===========