Change drive

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rogerdv

I have been looking in the docs, in Directory and OS, and cant find a way to change drive in Windows. How can I do this?

Change the drive for what purpose?

jgodfrey | 2020-12-12 17:46

Im writing my own open/save file dialog, I need to provide some way to change from C to D, E, etc.

rogerdv | 2020-12-12 19:32

:bust_in_silhouette: Reply From: Adam_S

If you’re using a FileDialog node, just set the access property to “File System” after that you should be able to select the current drive. You can do this in the editor or via code:

$FileDialog.access = FileDialog.ACCESS_FILESYSTEM

Otherwise it would be enough to use "D:\" (for example) in the path you are using to get or write a file.