LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop Files Onto EXE Icon

Solved!
Go to solution

I was wondering if there is a way to have the user drag and drop files onto the .exe icon and this would initiate the program to do something with those files automatically?


For example: Some PDF convertor programs allow you to drag and drop documents, images, etc. directly onto the PDF convertor icon on your desktop and it will automatically convert them all to PDF's, without the user even having to open the program.

 

Can this same type of functionality be done with a Labview EXE file?

Message 1 of 3
(3,547 Views)
Solution
Accepted by topic author Rogefeller

If you look at the Command Line Arguments Property of the Application class, the first element should be the EXE name, the following array elements will be the Path or Paths that were dropped on the EXE icon.

Message 2 of 3
(3,514 Views)

Thank you! That did it.

 

The only side note that I would include to others that are trying this is to make sure you have the "Pass All Command Line Arguments to Application" box checked in the "Advanced" section when you build the executable.

Message 3 of 3
(3,493 Views)