Jump to content

Find File Path from Windows Explorer?


Recommended Posts

Hey,

Background:

I'm busy trying to make a neat little program that reads files, and gives me information about it which works.

Question:

Instead of dragging and dropping the file into my labVIEW program, I'd like to just have the VI/Exe running in the background, and whenever I hit Ctrl-Shift-M. The file I currently have selected in Windows Explorer, It's path gets copied into my LabVIEW program, and then the program runs once.

I can do most of it, but the thing that I'm hoping to find a way, is how can I get the File's path into windows clipboard, or into labVIEW? I'm guessing I'll have to find a windows DLL to find which file is in focus, and then another to write that path to the clipboard, and then I know LV has a feature to read from the clipboard.

I apologize if my description is hard to follow, but I just think if this simple feature existed, it'd make File interaction just a lot cooler. Can anyone point me in the right direction on how to get this done?

Regards,

Nick.

Link to comment

QUOTE(NickyD_83 @ Feb 13 2008, 01:57 PM)

Instead of dragging and dropping the file into my labVIEW program, I'd like to just have the VI/Exe running in the background, and whenever I hit Ctrl-Shift-M. The file I currently have selected in Windows Explorer, It's path gets copied into my LabVIEW program, and then the program runs once.

I don't know of any way to programatically determing which files are selected in windows explorer. There are many third party replacements to windows explorer that will give you access to this functionality, but I think windows has it locked down.

Link to comment

QUOTE(NickyD_83 @ Feb 13 2008, 04:57 PM)

Hey,

Background:

I'm busy trying to make a neat little program that reads files, and gives me information about it which works.

Question:

Instead of dragging and dropping the file into my labVIEW program, I'd like to just have the VI/Exe running in the background, and whenever I hit Ctrl-Shift-M. The file I currently have selected in Windows Explorer, It's path gets copied into my LabVIEW program, and then the program runs once.

I can do most of it, but the thing that I'm hoping to find a way, is how can I get the File's path into windows clipboard, or into labVIEW? I'm guessing I'll have to find a windows DLL to find which file is in focus, and then another to write that path to the clipboard, and then I know LV has a feature to read from the clipboard.

I apologize if my description is hard to follow, but I just think if this simple feature existed, it'd make File interaction just a lot cooler. Can anyone point me in the right direction on how to get this done?

Regards,

Nick.

The only thing I could think of is to write a shell extension to add this functionality to Explorer. And that would have to be done using COM and therefore C++ (although you could techically speaking do it in Standard C if you know your way around COM).

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.