09-10-2003, 07:42 AM
speedlemon,
I don't know what you are doing, but it is often convenient to treat the filename as follows:
filespec$ = path$ + filename$ + ext$
This way, you can ask for filename, then check for path and ext. If they are not given you can supply them. If they are given you can use them. If you are supplied a filename like:
filename.dat
You can manipulate it as:
filename.bak
for example. or...if you are given:
c:\qb45\mydata.txt
you can write the file:
c:\qb45\outfile.txt
The *really convenient* way to use this is to write a program that you compile. Then, in windows, you launch your program by simply "dropping" a program onto the exe. You use the "COMMAND" command to get filespec$. Then you parse filespec$ into path$, root$, ext$...now you are good to go...user doesn't have to enter anything...automate dataout filenames and stick them in the correct path.
If you want a more detailed explaination, or example, just ask.
I don't know what you are doing, but it is often convenient to treat the filename as follows:
filespec$ = path$ + filename$ + ext$
This way, you can ask for filename, then check for path and ext. If they are not given you can supply them. If they are given you can use them. If you are supplied a filename like:
filename.dat
You can manipulate it as:
filename.bak
for example. or...if you are given:
c:\qb45\mydata.txt
you can write the file:
c:\qb45\outfile.txt
The *really convenient* way to use this is to write a program that you compile. Then, in windows, you launch your program by simply "dropping" a program onto the exe. You use the "COMMAND" command to get filespec$. Then you parse filespec$ into path$, root$, ext$...now you are good to go...user doesn't have to enter anything...automate dataout filenames and stick them in the correct path.
If you want a more detailed explaination, or example, just ask.