reading Desktop and/or My computer

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

Nicstt(Posted 2006) [#1]
Is there a way of reading these from within blitz?

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

Yan(Posted 2006) [#2]
You wot?

You wanna grab an image of the desktop?

You wanna get the path to the desktop folder?

What about MyComputer?


Nicstt(Posted 2006) [#3]
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?:)

Yan(Posted 2006) [#4]
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?

Nicstt(Posted 2006) [#5]
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.

Yan(Posted 2006) [#6]
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$



Look here for more info about enumerating the current drives.

Nicstt(Posted 2006) [#7]
Thx Yan:)