I have a very basic script, that looks something like

myProg -i INFILE >%TEMP%\INFILE.tmp
mySecProg -i %TEMP%\INFILE.tmp -o OUTFILE

How do I add this script to my contextmenu, such that the 'INFILE' is the file I've rightclicked, and how do make sure the OUTFILE will be in the dirname of the 'INFILE.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

You can add items for a specific file type by selecting Tools -> Folder Options -> File Types -> Advanced and adding a new action.

If I look at the "open" entry for a .txt file I see "C:\WINDOWS\system32\NOTEPAD.EXE %1"; the "%1" passes the name of the file into the program script and can be accessed in your script by using the "%1" variable name rather than "INFILE". You would then have to do a wee bit of string manipulation to create your OUTFILE name - I seem to remember looking for the last "\" and deleting from that point in the past.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown