How do I add a userscript to the Context (right click) menu in WinXP Explorer?

1

1

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.

user22863

Posted 2010-01-21T04:02:06.800

Reputation:

Answers

0

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.

Neal

Posted 2010-01-21T04:02:06.800

Reputation: 8 447