hi. ok i used this:
INPUT "What file do you want to copy"; filepath$
dir$ = filepath$ + " C:\DOS"
SHELL dir$
Hi Brent; you're doing this backwards. Lets say you enter "taco" for your filepath$.
Your dir$ will become
taco C:\DOS, which isn't any kind of DOS command, (or any other.)
Your dir$ needs to be complete. Lets say you want to end up with this:
COPY C:\taco.txt C:\DOS
Then you would need to do this:
INPUT "What file do you want to copy"; filepath$
(You enter "taco.txt")
dir$ = "COPY C:\" + filepath$ + " C:\DOS"
SHELL dir$
Try that.
Also, if you want to make sure the person entered a file extension, do this:
INPUT "What file do you want to copy"; filepath$
(You enter "taco") Leaving off the extension.
IF RIGHT$(filepath$,4)<>CHR$(46) THEN
PRINT "You must enter a file extension."
INPUT "What file do you want to copy"; filepath$
END IF
dir$ = "COPY C:\" + filepath$ + " C:\DOS"
SHELL dir$
There's lots of ways to do an error check, I just did that one real quick to fit into this forum. Experiment with different techniques.