Jump to content

Get filename when right click


Recommended Posts

I'm trying to use a CMD to do things when I right click on a file but how to get the filename of the file that I click on?

eg:

- I put a utility name base64.exe in windows\system32

- I right click on a file name 01.base64 reside in any folder and choose "Base64 Decode" (which is done through registry entry below)

HKLM, "%CLASS%\.Base64\shell\Base64Dec", , , "Base64 Decode"
HKLM, "%CLASS%\.Base64\shell\Base64Dec\command", , , "base64.cmd"

The base64.cmd contains the following code:

@echo off
:BaseDec
Mode 80,12 & Color f1
ECHO Please input the desire new output filename including the extention.
SET NewName=
SET /P NewName=Please input the desire new output filename including the extention.
base64 -d "%1" "%NewName%"
EXIT

:Base64En
base64 -e "%1" "%1.Base62"
EXIT

As you all can see, the %1 does not work here. Please help!

Link to comment
Share on other sites


HKLM, "%CLASS%\.Base64\shell\Base64Dec", , , "Base64 Decode"
HKLM, "%CLASS%\.Base64\shell\Base64Dec\command", , , "base64.cmd"

I may have the syntax off slightly but perhaps you need a %1 in there:

HKLM, "%CLASS%\.Base64\shell\Base64Dec", , , "Base64 Decode"
HKLM, "%CLASS%\.Base64\shell\Base64Dec\command", , , "base64.cmd %1"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...