Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy a zip to Documents folder
Message
 
 
À
26/09/2016 14:19:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01641333
Message ID:
01641365
Vues:
45
Thank you.... looks like Documents is correct.

>http://www.sevenforums.com/general-discussion/175858-confused-between-difference-my-documents-documents-win7.html
>
>>Frank, this does work great... but on Windows 7 the function returns "C:\Users\Lenovo\Documents\" instead of "C:\Users\Lenovo\My Documents\".
>>
>>The latter is what it actually is if you open up that path. Can I assume these are in fact the same?
>>
>>
>>
>>>>Can someone give me the proper code to copy a "My.zip" file to the Documents folder that will work on all version of Windows?
>>>>
>>>>Also, is there anyway to create a Subfolder within the Documents folder on the fly?
>>>>
>>>>Thanks in advance for the help.....
>>>
>>>Hi Mel,
>>>
>>>I assume your major problem is just getting the Documents path. Here is one bit of code (it is from Craig Boyd's - at least I think it's his - GridExtras)
>>>
>>>
#DEFINE CSIDL_PERSONAL 0x0005
>>>LOCAL lcFolderPath, lcDocumentsPath
>>>m.lcFolderPath = space(255)
>>>
>>>DECLARE SHORT SHGetFolderPath IN SHFolder.dll ; 
>>>    INTEGER hwndOwner, INTEGER nFolder, INTEGER hToken, ; 
>>>    INTEGER dwFlags, STRING @pszPath 
>>>
>>>SHGetFolderPath(0, CSIDL_PERSONAL, 0, 0, @m.lcFolderPath)
>>>
>>>m.lcDocumentsPath = Alltrim(m.lcFolderPath)
>>>
>>>m.lcDocumentsPath = SubStr(m.lcDocumentsPath,1, Len(m.lcDocumentsPath) - 1)
>>>RETURN ADDBS(m.lcDocumentsPath)
>>>
>>>You can use MKDIR to create a folder
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform