Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning a batch script by right clicking any file
    text
    copied!<p>The idea is to right click any file and then select "backup" in a drop down that just copies the file and adds a date time to the end of its name, then possibly moves that copy to another drive. </p> <p>I would like a method of running a batch script by right clicking on a file and either passing that in as an argument (without typing it in), or somehow knowing that file is the one that should be used in the script. </p> <p>Mainly for windows XP, I need it to be native as many site computers I work on do not belong to us and I don't want to copy over more files than necessary or rely on anything more than the standard commands available (two thirds of the machines don't have powershell ect) </p> <p>I know how you can change file options to open a cmd at a specific folder location(below), and I cold probably change this to work for 1 specific file type, but I don't want to add a key for each type of file on the machine. </p> <p>[HKEY_CLASSES_ROOT\Folder\shell\1.bat\command] @="c:\windows\system32\cmd.exe \"%1\"" </p> <p>From another site one work around that nearly solves this for me</p> <p>jvierra - "Windows has always had that ability without changing the registry.</p> <p>Place a bat or VBS file on your desktop. Drag and drop a file on the bat icon. The bat will receive the file name of the dropped file as %1 and vbscript will receive it as WScript.Arguments(0).</p> <p>Try it. It works quite well. The bat or script can do anything with the file from that point."</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload