Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
move a file
#1
dose anyone no of a easy way to move a file to a new location?
..
Reply
#2
you may want to use a shell command

[syntax="qbasic"]SHELL ""[/syntax]

I'm not sure of the move file command, but if you search for it, you should get it wasily enough

otherwise, just open the file, and create a new file in teh new directory, then copy contents into new file, KILL the old file

Oz~
Reply
#3
ok, I got it

[syntax="qbasic"]copy [source] [dest][/syntax]

Code:
INPUT "File To Move: ", $file
INPUT "Destination Folder: ", $dest

SHELL "copy "; $file;" "; $dest

Oz~

[EDIT] This is where I got the stuff, if you want to do more complex things:
http://www.easydos.com/copy.html
Reply
#4
Or, you could just use QBs builtin move function.

Code:
NAME "afile.txt", "folder\moved.txt"
Reply
#5
Several years ago there was no MOVE command in DOS, and you had to use a move utility. Now, there is a MOVE. Get on the command line, and enter this:
MOVE /?
That will tell you the syntax.
Do a few tests.
Now you're ready to perform a MOVE within your program's SHELL command.
*****
Reply
#6
Thanks Oz Z!re and Moneo
..
Reply
#7
No problem, you're welcome.
Reply
#8
Ok, hope you get it to work like you want.
*****
Reply
#9
notta prob
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)