Hello,
I am new to XYPlorer. I am looking to solve a problem I have.
I would like to be able to open PDF documents with two different programs, based off the file path. The situation at hand is I work for a company that has a site to site VPN to our factory in the country of Belgium. I am in the United States. So when I open a PDF from Belgium in Foxit it loads choppy. If I open in Google Chrome, it loads nice and fast.
So I would like to open files from a shared drive (mapped network drive) in Chrome and local files in my windows default.
Any ideas?
Open File Type - Different Programs
Re: Open File Type - Different Programs
Save the attached .xys document in your XYplorer scripts folder (use the same name)
Open it with a texteditor and adapt the mapped drive letter and the path to chrome Create a CFA (Customize File Association) entry at the top of the list:
Open it with a texteditor and adapt the mapped drive letter and the path to chrome Create a CFA (Customize File Association) entry at the top of the list:
"Open pdf" pdf>::load "Open pdf.xys";
One of my scripts helped you out? Please donate via Paypal
Re: Open File Type - Different Programs
Thank you for the prompt reply.
Not to be difficult but is it possible to map more than one drive letter to open the special way? I have 6 drives that I would like to do this with.
Thank you so much!
Not to be difficult but is it possible to map more than one drive letter to open the special way? I have 6 drives that I would like to do this with.
Thank you so much!
Re: Open File Type - Different Programs
Why didn't you say that in the first place?...
Code: Select all
$mapped = <<<>>>
F:
G:
H:
X:
Y:
Z:
>>>;
$chrome = "path to chrome\chrome.exe";
end (exists($chrome) != 1), quote($chrome) . <crlf 2> . "not found, aborted!";
$drive = gpc(<curitem>, "drive") . ":";
if (regexmatches($mapped, "^$drive")) { run """$chrome"" ""<curitem>"""; }
else { run """<curitem>"""; }
One of my scripts helped you out? Please donate via Paypal
Re: Open File Type - Different Programs
Because I am not smart. Sorry.
The first code worked but this one is giving me a script error.
The first code worked but this one is giving me a script error.
- Attachments
-
- Screenshot 2021-10-06 170348.png (51.39 KiB) Viewed 1048 times
-
- Screenshot 2021-10-06 170319.png (36.56 KiB) Viewed 1048 times
Re: Open File Type - Different Programs
Remove the
// Drive letter...
comment on that lineOne of my scripts helped you out? Please donate via Paypal
Re: Open File Type - Different Programs
Thank you so much!!!