Page 1 of 1

Fragen zur Version 1.11.1

Posted: 29 Jul 2006, 20:45
by thesmilyface
Ich schreibe in Deutsch und hoffe das ist ok. Mein Englisch ist nicht das Beste.

Ich verwende Version 1.11.1.748.

1.) Wie ermittle ich die Attribute einer ausgewählten Datei oder Verzeichnis?

2.) Wie ermittle ich den absoluten Pfad zum Papierkorb?

Tschüss Frank
[hr]
Translation for visitors not speaking German:
I'm using version 1.11.1.748.

1.) How do I retrieve the attributes of a selected file or folder?

2.) How do I retrieve the absolute path to the recycle bin?

Bye Frank

Re: Fragen zur Version 1.11.1

Posted: 30 Jul 2006, 19:24
by TiKu
thesmilyface wrote:1.) Wie ermittle ich die Attribute einer ausgewählten Datei oder Verzeichnis?
Das geht mit ExplorerTreeView nicht direkt. Dieser Code liefert den absoluten Pfad des gewählten Items:

Code: Select all

Dim path As String

path = ExTvw1.ItemHandleToFSPath(ExTvw1.SelectedItem)
Anschließend kann man bspw. GetAttr nutzen um die Attribute zu ermitteln.
thesmilyface wrote:2.) Wie ermittle ich den absoluten Pfad zum Papierkorb?
Auch das geht nicht direkt. ItemHandleToFSPath() könnte auch hier weiterhelfen, ansonsten die API-Funktionen SHGetFolderLocation() (mit CSIDL_BITBUCKET) und SHGetPathFromIDList().
Allerdings gibt es eigentlich nicht DEN absoluten Pfad zum Papierkorb. Vielmehr hat jedes Laufwerk seinen eigenen Papierkorb und der Papierkorb auf dem Desktop ist ein virtueller Ordner, der als gemeinsames Interface dient.
[hr]
Translation for visitors not speaking German:
thesmilyface wrote:1.) How do I retrieve the attributes of a selected file or folder?
This can't be done with ExplorerTreeView directly. This code retrieves the absolute path of the selected item:

Code: Select all

Dim path As String

path = ExTvw1.ItemHandleToFSPath(ExTvw1.SelectedItem)
Now you can use e. g. GetAttr to retrieve the attributes.
thesmilyface wrote:2.) How do I retrieve the absolute path to the recycle bin?
This can't be done directly either. ItemHandleToFSPath() may help here again, otherwise the API functions SHGetFolderLocation() (with CSIDL_BITBUCKET) and SHGetPathFromIDList().
But actually there isn't THE absolute path to the recycle bin. In fact each drive has its own recycle bin and the recycler on the Desktop is a virtual folder, that serves as a common interface.