reading Desktop and/or My computer

Miscellaneous Forums/Win32 Discussion/reading Desktop and/or My computer

Is there a way of reading these from within blitz?

I suck at windows stuff, so no complicated answers please:)

You wot?

You wanna grab an image of the desktop?

You wanna get the path to the desktop folder?

What about MyComputer?

:o/

no when using file search functions etc within blitz

was wondering if there is a readable path to desktop or My Computer?

or something I could easily adapt?:)

With BMax...
Local homePath$ = getenv_("HOMEDRIVE") + getenv_("HOMEPATH")
Local desktopPath$
If homePath$ Then desktopPath$ = homePath$ + "\desktop"

Print homePath$
Print desktopPath$
...should give you the path to your desktop.



MyComputer isn't a real folder (AFAIK) and can't be accessed as one. I believe there's an API call to return the current drives available, if that's what you're after?

Thx Yan,

Yeh looking for what drives are available.

Damn I use B+ and b3d, however seeing if i can find similar instructions for them.

Oops...I could've sworn I'd seen you post in the BMax section. :o/

Anyway, the B3D version would be...
homePath$ = GetEnv("HOMEDRIVE") + GetEnv("HOMEPATH")
If homePath$ Then desktopPath$ = homePath$ + "\desktop"

Print homePath$
Print desktopPath$

WaitKey()

End


Look here for more info about enumerating the current drives.

Thx Yan:)