ChangeDirectory |
Files | |
Aptilis 1 |
ChangeDirectory(DirectoryName)
ChangeDirectory changes the directory your
programme is running in to the one you specify.
Changing directories allows you to access different
files stored in various places. Alternatively,
you can indicate the full path of a file each time,
but this might not be as efficient.
The path indicated should be constructed
according to your platform.
Windows/DOS way: c:\texts\accounts
Unix way: /texts/accounts
(Don't forget that '\' is a special character and must
be writen '//' in strings)
Return Value:
0 if everything was OK.
-1 in case of error and the _errno variable contains more details about the error.
Example:
d = getCurrentDirectory() $ print(d$, "\n") // There are two backslashes, because 'backslash' is a special character changedirectory("c:\\windows") d = getCurrentDirectory() $ print(d$)Result:
c:\aptilis c:\windows |
See also GetCurrentDirectory.