change drives
BlitzMax Forums/BlitzMax Programming/change drives
| ||
does anybody know or have an idea on how to change drives. I know how to access and change directories from with in a bmax created executable. There is some code in the archives that gives information about available drives: http://www.blitzbasic.com/codearcs/codearcs.php?code=1973 but how do you change drives(like c:,d: etc.)? |
| ||
?? |
| ||
you use change "changedir" to change dir. how do you change drives? |
| ||
To change the current directory use:ChangeDir "C:\" ChangeDir "D:\" EDIT: Or if you want the same path on a different drive you could look for "C:\" and replace it with "D:\". Print "C:\WINDOWS\".Replace("C:\", "D:\") |
| ||
I would have never guessed it or tryed it if I had not seen it. Thanks Plash |
| ||
If your at a path already (you can check what path your at by using CurrentDir(), it should be set to AppDir by default) and you use ChangeDir "<DriveLetter>:\" the current directory will be set to "<DriveLetter>:\", instead of effectively 'changing the drive'. Use the code in my edit if you really need to change the drive. |
| ||
I have all that figured out, if you check my file requester on my previous thread, you can see I have all that figured out except the just mentioned. It's all clear now. Thanks. |