Information générale
Catégorie:
Fonctions Windows API
Titre:
How can I retrieve the path to my documents folder
I want to use the putfile() function to save a file to the "my documents" folder.
So, I need to determine the full path to the "my documents folder". I have seen other threads that indicate one can use the Windows Scripting Host for such things. I see from other threads that I create an object as follows:
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
And that there is a GetSpecialFolder() method and a Getfolder() method for this object. But the docs on getspecialfolder() only show that you can pass in arguments for the Windows Folder, The System Folder and the temp folder, but I don't see a constant for the my documents folder.
Also, if I execute:
osomeobject=ofso.GetSpecialFolder(1)
and display memory, osomeobject shows up as 'of unknown type'
I don't know how to access the properties and methods of this object.
Any help on how to use this object, or any other method for getting to my documents, would be appreciated.
TIA
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement