Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Right click context menus passing names of highlighted files ... how to access all

Status
Not open for further replies.

dxpwny

Advanced Member level 4
Full Member level 1
Joined
Jun 29, 2008
Messages
112
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,479
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top