My program accepts input file names either as command line parameters, either in a drag and drop operation or in Explorer, clicking on file names with the extension associated with my program.
The command line and drag and drop work fine, but click on the file names in Explorer, which cause problems when the file paths of the files they were clicked on have spaces in them, for example:
c:\temp\file one.txt c:\my directory\filetwo.txt c:\my directory\file three.txt
then the ParamStr function returns me:
ParamStr(1): c:\temp\file ParamStr(2): one.txt ParamStr(3): c:\my ParamStr(4): directory\filetwo.txt ParamStr(5): c:\my ParamStr(6): directory\file ParamStr(7): three.txt
How can I best restore them back to the three file names that I need?
source share