Thomas Thomas - 7 months ago 26
Bash Question

How to get a file into variable, by starting perl script with windows context menu

I've recently created a Word to SharePoint Page converter.
was made into an
so everyone in our company can use it without perl installed.
It currently has a GUI, where you can add
files via file explorer.

I've rewrote the code and added a context menu entry for .doc and .docx files which starts

Now my question is, instead of adding several documents via the GUI, I want to accomplish a one click (in context menu) which starts the with the currently selected file.docx as an input file.

my $input = "the file+its path I selected via Windows context menu";

How would I do this?


Try this .reg file (adjust the paths as needed)


@="c:\\Perl\\bin\\perl.exe c:\\Perl\\ \"%1\""

When your perl script starts, you'll have your .docx file name in the $ARGV[0] variable.