dxpwny
Advanced Member level 4
Please forgive me if I am mis-using smom terms here. I mostly know what I'm doing,
but not always sure what the term for it is.
I am running Windows 10 Professional. I will often create context menu items to allow me to right click on a particular file type and easily perform a particular function on that file. Been doing that for a while ... no problems ... until now.
I want to be able to use Windows Explorer, highlight several files (right now they have the same extension, but Id like that not to matter), then right click on the selected files, and select a context menu item to "process" them all.
For example, I want to right click on 3 files within a particular directory, f1.txt, f2.txt, and f3.txt, then select the contect menu item "calculate cksums".
I then want all three files passed to a batch file I write that does something like this
@echo off
echo.
echo Cksums are:
echo.
call cksum %1
call cksum %2
call cksum %3
echo.
pause
A single DOS window would pop up, run pass each file to the cksum program which basically emulates the Linux program of the same name. All three checksums would display, and after I decide I'm done looking at it I press a single key and the DOS window closes.
I've got the context menu item set up, it passes the highlighted file to the batch file, and the batch file shows the checksum.
My "problem" is that 3 DOS windows open, each of them getting just one file to process.
I sort of understand why ... but I can't figure out a way to get around that.
I know there'd be a better way to handle varying numbers of files, using the FOR command. I got that. Understood - but the same issue still exists. A separate DOS window is opened for each file.
Can anyone offer a solution ?
Thanks
but not always sure what the term for it is.
I am running Windows 10 Professional. I will often create context menu items to allow me to right click on a particular file type and easily perform a particular function on that file. Been doing that for a while ... no problems ... until now.
I want to be able to use Windows Explorer, highlight several files (right now they have the same extension, but Id like that not to matter), then right click on the selected files, and select a context menu item to "process" them all.
For example, I want to right click on 3 files within a particular directory, f1.txt, f2.txt, and f3.txt, then select the contect menu item "calculate cksums".
I then want all three files passed to a batch file I write that does something like this
@echo off
echo.
echo Cksums are:
echo.
call cksum %1
call cksum %2
call cksum %3
echo.
pause
A single DOS window would pop up, run pass each file to the cksum program which basically emulates the Linux program of the same name. All three checksums would display, and after I decide I'm done looking at it I press a single key and the DOS window closes.
I've got the context menu item set up, it passes the highlighted file to the batch file, and the batch file shows the checksum.
My "problem" is that 3 DOS windows open, each of them getting just one file to process.
I sort of understand why ... but I can't figure out a way to get around that.
I know there'd be a better way to handle varying numbers of files, using the FOR command. I got that. Understood - but the same issue still exists. A separate DOS window is opened for each file.
Can anyone offer a solution ?
Thanks