viennese_finger has asked for the wisdom of the Perl Monks concerning the following question:
Hi
i just posted this and it came up as posted by an anonymous user, so I'm redoing it properly...bear with me
I would like to write a perl script that allows a user to select a file from windows explorer and use this as the input for the code within the perl script (like STDIN).
So the code would open windows explorer to the correct directory, the user would then click on (select) their file, and then the script would do it's business on the selected file as a variable (e.g. my $selectedFile).
I have found some code to open windows explorer:
...which works fine (based on Perl monks http://www.perlmonks.org/bare/?node_id=313539) to open windows explorer from the pl script.my $explorer = 'c:/windows/SysWOW64/explorer.exe'; my $directory = 'C:\\testdir\\'; system($explorer,$directory);
How do I get the code to then recognise the file I click on in the explorer window, and create a variable from it? Is it possible or is Perl not the way to do it?
Cheers, Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: select input file from windows explorer
by Corion (Patriarch) on Jul 06, 2016 at 17:55 UTC | |
|
Re: select input file from windows explorer
by BrowserUk (Patriarch) on Jul 06, 2016 at 17:56 UTC | |
|
Re: select input file from windows explorer
by Marshall (Canon) on Jul 06, 2016 at 18:02 UTC | |
|
Re: open windows explorer and select file for processing
by stevieb (Canon) on Jul 06, 2016 at 18:05 UTC | |
by Marshall (Canon) on Jul 06, 2016 at 18:17 UTC | |
by stevieb (Canon) on Jul 06, 2016 at 18:30 UTC | |
|
Re: open windows explorer and select file for processing
by FreeBeerReekingMonk (Deacon) on Jul 06, 2016 at 18:26 UTC | |
|
Re: open windows explorer and select file for processing
by harangzsolt33 (Deacon) on Jul 07, 2016 at 03:58 UTC | |
|
Re: select input file from windows explorer
by viennese_finger (Initiate) on Jul 06, 2016 at 17:59 UTC |