If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Right-Click File Name And Pass It To .CMD File?
I'd like to set up my XP machine so that if I right-click on a
file, a .CMD will be executed with the file name passed to the command file. e.g. If I right-click on a file named "Payroll.xls", XP will start a .CMD file named SecureZip.cmd and pass "Payroll.xls" to it as a parm. FWIW, within the command line we will have something like: "c:\program files\winzip\wzzip.exe" -smypw -ycAES256 payroll payroll.xls The idea being the ability create an encrypted .ZIP file by clicking on the file we want to zip - without having to click around in the WinZip UI. Or am I just wishing? -- Pete Cresswell |
Ads |
#2
|
|||
|
|||
Right-Click File Name And Pass It To .CMD File?
Per (PeteCresswell):
I'd like to set up my XP machine so that if I right-click on a file, a .CMD will be executed with the file name passed to the command file. e.g. If I right-click on a file named "Payroll.xls", XP will start a .CMD file named SecureZip.cmd and pass "Payroll.xls" to it as a parm. I withdraw the question. Per http://tinyurl.com/7ensq6k... somebody thinking out of the box came up with the fact that if one puts an icon to the .CMD file on the desktop and drags/drops a file on to the icon, the file's name gets passed as Argument(0)... even easier/quicker than right-clicking IMHO. -- Pete Cresswell |
#3
|
|||
|
|||
Right-Click File Name And Pass It To .CMD File?
Per (PeteCresswell):
Per http://tinyurl.com/7ensq6k... somebody thinking out of the box came up with the fact that if one puts an icon to the .CMD file on the desktop and drags/drops a file on to the icon, the file's name gets passed as Argument(0)... even easier/quicker than right-clicking IMHO. Here's the final product: ================================================== ============== "c:\program files\winzip\wzzip.exe" -a -ssandow -ycAES256 "%~d1%~p1%~n1.zip" %1 :* PAUSE ================================================== ============== With allowance for newsreader's text folding.... Put that puppy into a .CMD file. Then put a shortcut to said .CMD file anywhere that is convenient. Now just drag/drop a file on to the shortcut and you'll wind up with a like-named .ZIP file in whatever directory the original file was in. -- Pete Cresswell |
Thread Tools | |
Display Modes | |
|
|