09-25-2003, 02:27 AM
I've run into a problem. Recently at work I've been writing a bunch of programs that do an assortment of tasks with XLS, CSV, and tab-delimited text files. Mostly conversion, removing duplicate records, etc.
Anyways, my problem is that I like to make the programs such that you can drag-and-drop files onto the compiled executable. I've been doing this by using the "COMMAND$" function, looking through the string to parse by spaces, and saving the filenames to an array, then working with those filenames.
My problem is that the COMMAND$ function will only take maybe three or four files before it becomes too long. In otherwords, if I select two file and drag-and-drop them onto an executable, it works just fine. But if I drag and drop FIVE files onto the executable, it gives an error message.
Is there any way of increasing the allowed length of this function so that more files could be dropped onto the exe file? If not, does anybody know of a different approach to allow for the ease of drag-and-drop capabilities for an exe file?
I've noticed that one reason the command line gets so long is because it includes the files' full paths, e.g.
"M:\CLIENTS\DATA\CUSTOMER\SPREADSHEETS\09242003\blahblah.xls"
If I'm running this program IN the M:\clients\....\09242003\ folder, is there any way to make it just pass the filename instead of the full path?
I figure somebody'll have some great advice on this.
*peace*
Meg.
Anyways, my problem is that I like to make the programs such that you can drag-and-drop files onto the compiled executable. I've been doing this by using the "COMMAND$" function, looking through the string to parse by spaces, and saving the filenames to an array, then working with those filenames.
My problem is that the COMMAND$ function will only take maybe three or four files before it becomes too long. In otherwords, if I select two file and drag-and-drop them onto an executable, it works just fine. But if I drag and drop FIVE files onto the executable, it gives an error message.
Is there any way of increasing the allowed length of this function so that more files could be dropped onto the exe file? If not, does anybody know of a different approach to allow for the ease of drag-and-drop capabilities for an exe file?
I've noticed that one reason the command line gets so long is because it includes the files' full paths, e.g.
"M:\CLIENTS\DATA\CUSTOMER\SPREADSHEETS\09242003\blahblah.xls"
If I'm running this program IN the M:\clients\....\09242003\ folder, is there any way to make it just pass the filename instead of the full path?
I figure somebody'll have some great advice on this.
*peace*
Meg.