Accessing drag and dropped files in a console application

I have a console application that accepts tab delimited text files and outputs XML. I'm able to access command line arguments using the My.Application.CommandLineArgs property. However, when a file is dropped on the exe from inside Windows Explorer, the CommandLineArgs property is empty.

ex.


Answer this question

Accessing drag and dropped files in a console application

  • urikohan

    Yes, I'm sorry I didn't reply sooner. I ended up trying the same project on a different computer, and it worked fine... I ended up having to reinstall the .net runtimes and VB.net on the computer with the problem, and it works there as well now.

    Sorry I didn't test it on another computer before asking.


  • Boidzerg

    Your code worked fine for me in both a Console Application and a Windows Application. I tried passing parameters at the command line and using drag/drop in Windows Explorer.

    Are you getting any kind of other errors Have you tried a simple sample Have you tried another machine

    Hope this points you in the right direction,
    Adam Braden
    Visual Basic Team


  • Xuegen Jin

    Hi Delphyne,

    Is your problem solved

    regards,
    bhanu.



  • Accessing drag and dropped files in a console application