moving files
BlitzMax Forums/BlitzMax Beginners Area/moving files
| ||
How do I move a file from one dir to another one? Not talking about reading a file with readfile() and writing it to a new file again with writefile() .. (=slow) I mean the native way, like how windows (or whatever OS) does it.. the fast way. If someone has a function (not a method!) suggestion, please in this format: Movefile sourcefile$,destinationpath$ ..with everything local, no globals :P |
| ||
try looking with the search 'copy file' under Bmax. There's an example that use *stream* to copy (moving a file is copy it and then - delete it) |
| ||
RenameFile()? |
| ||
degac: isn't moving just simple moving those clusters or sectors or whatever, rather than the physical data? You can move gigabytes o' files in a splitsecond in windows .. for sure it's not really physically copying and deleting then :P khomy: will try, tnx |
| ||
prime: yay, works! |
| ||
RenameFile()? But will a rename also allow you to move from one drive to another? |
| ||
it's new to me too... |
| ||
xlsior: tested it .. it works! (edit) yipes.. from one DRIVE to another DRIVE .. hm.. need to test that yet :P |
| ||
CS_TBL: Just wondering, since a 'rename' under DOS (or windows console) won't move a file across devices... |
| ||
I expect that since Max is cross platform, the behavior should be the same on all platforms. If it's only Windows that doesn't allow stuff to go across the device, chances are this has been worked around to provide the window support for moving across devices? |