[SOLVED] Is there a way to open windows explorer to a specific path... from the browser?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

[SOLVED] Is there a way to open windows explorer to a specific path... from the browser?

Post by Jaymer »

Kinda weird concept.
Don't think this is doable.
A customer has document storage on their local network in a well-defined hierachy,
where they track lots of engineering documents, plans, contracts, etc.
Screen Shot 2021-11-30 at 7.37.40 PM.png
Screen Shot 2021-11-30 at 7.37.40 PM.png (45.74 KiB) Viewed 3201 times

If they are now tracking Jobs in an Aware database, and I am viewing a job's Engineering details, I can calculate the path to the Documents I want to view:
N:\Documents\Archive\2020\Job1-100\001\D. Drawings

What I want to do is click a button in aware and open Windows Explorer pointing to the path above.
Right now its a manual journey as they navigate the hierarchy to find something.

Can I run some JS somehow which causes the browser to display a local path on the user's machine?
Last edited by Jaymer on Thu Dec 02, 2021 8:54 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Is there a way to open windows explorer to a specific path... from the browser?

Post by joben »

As far as I know, opening something with Windows Explorer from a browser link was only possible in some Internet Explorer versions (or if you are running an html file locally on your computer).
Sharepoint for instance had this feature out of the box and it worked in IE.
Would be surprised if Chrome for instance allowed this behaviour.

Here are some methods that might work:

Figure out how to construct .lnk files (shortcut files).
They are not readable using notepad or similar, you would need a tool for this sort of thing to figure out the structure.
If successful, downloading a .lnk file and running it should not alert security functions.

Make AwareIM download a html document containing a link to the folder location
Example code how the a href looks like: https://www.geeksforgeeks.org/how-to-ma ... -a-folder/
This should not be a security problem since the HTML file is run from your local drive.
The steps would look something like this:
1. Click the link.
2. Wait for html file to download.
3. Run html file, it will open in new tab.
4. Click the link.
5. Voila, maybe.

Display the file path as a field that is easy for the user to copy, then they can paste it in the Windows Explorer address field
Perhaps this is what you have right now. You could even make a javascript copy button that copies the path to the clipboard.

Lower security settings in your browser or use plugins to allow linking to local drive folder locations
A bad idea but it might also work.
Regards, Joakim

Image
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Is there a way to open windows explorer to a specific path... from the browser?

Post by ACDC »

Here is a simple solution that will work all the time and not be subject to potential changes to the environment on the client side:

Drop a Syncthing agent on the customers network and then sync (mirror) the Document storage files and folder to the AIM server .

Then let your app work on/access the Aim server local mirrored files. If there is change to the document, the syncthing agent can instantaneously update the change back to the customers network or via local sync depending on doc type, while maintaining versioning.

I do something similar involving in access of 500 000 images and it works like a charm, its highly efficient

Obviously this is very customer specific, scaling across multiple customer BSV's could become hectic
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there a way to open windows explorer to a specific path... from the browser?

Post by Jaymer »

Thx for suggestions.
This is mainly for 1 customer - 1 BSV.
Internal for this customer only. So no issues enforcing things like this.
There IS a lot of data - the local network with the archive and an Upcloud server with Aware.

1 benefit I could see is there is an automatic off-site backup (a mirror), however a ransomware attack on the local network/files would also corrupt the mirror, but I guess backups could mitigate that damage.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there a way to open windows explorer to a specific path... from the browser?

Post by Jaymer »

Without doing either of the above suggestions, I found out about this - and seem to have great success.

https://www.vnprodev.com/browser-extens ... #userguide

Here's is a Aware test form. The 1st path works to open a file browser inside Chrome.
But that doesn't work if its a page from the web.
The extension helps with this.


in my test path, I have to URL_ENCODE it for any funky characters - but then that changes a SPACE to a +, instead of a %20.
I used REPLACE PATTERN to change the +'s.
Here's my rule:
Screen Shot 2021-12-02 at 3.44.25 PM.png
Screen Shot 2021-12-02 at 3.44.25 PM.png (11.66 KiB) Viewed 3128 times


Now, on a Form I used an HTML cell to make a link.
Screen Shot 2021-12-02 at 3.49.02 PM.png
Screen Shot 2021-12-02 at 3.49.02 PM.png (68.88 KiB) Viewed 3128 times
You can see in the status bar how the browser is changing the "file://" to "localexplorer"



Thats because of this Chrome extension.
and now when I click on the icon it opens a Windows Explorer window pointed to my files.
Very nice.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: [SOLVED] Is there a way to open windows explorer to a specific path... from the browser?

Post by ACDC »

1 benefit I could see is there is an automatic off-site backup (a mirror), however a ransomware attack on the local network/files would also corrupt the mirror, but I guess backups could mitigate that damage.
In Syncthing there is a versioning option that maintains x number of versions stored in a folder within the source folder. So in the case of a ransomware change to the file, revert to previous version - This together with an offline back-up will be a robust solution to preserve the file .
There IS a lot of data - the local network with the archive and an Upcloud server with Aware.
My largest Document store is 200GB, and have no problems
Without doing either of the above suggestions, I found out about this - and seem to have great success.

This seems very interesting , I have an application for this right now for local access to some txt files which I will try. However I wonder how efficient it would be in a networked environment where the document store is not local.

Also it only runs on windows which could be a problem not to mention reliance on the workstation environment.

In a document store such as the one you presented , I still think my Syncthing solution will be more reliable. Its also transparent to the user which makes it easier to implement. Once initial synchronization of the document store is complete, synchronizing changes are lightning quick. Also changes to the Document Store layout outside AIM is automatically catered for resulting in easy folder/file discovery from within AIM
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: [SOLVED] Is there a way to open windows explorer to a specific path... from the browser?

Post by Jaymer »

I'm not sure I understand fully the 'syncing' thing.
My 1st issue (against it) was they'd be using network traffic to constantly copy files up to the server (as they edit documents).
... for what purpose then? I don't need to open the documents from inside Aware.
... or even store them in a database.
(of course we might move to that - but i'm not sure why)

The reason was because they are constantly in the Aware db looking at a Job and they find themselves wanting to go to their file store to look at a document. So they open Windows Explorer and navigate many levels deep to get to the desired folder. That structure is static. So if they were on a Job and in the Engineering Drawings sections, then clicking on the PINK ICON (from the image) would save several seconds as it would have already built a "file://" link out to the Public drive and to that Customer's Drawings folder for a given Job... thus, 1 click away.

They don't really need to pull those docs up inside Aware, or from offsite. For 15+ years its been on their local network.
We ARE going to start tracking incoming/outgoing emails from Aware, rather than from employee Outlook mailboxes, but I'm not sure what they gain by having all these other docs inside MSSQL -OR- in a Tomcat path.

But I appreciate the discussion!
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply