Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy a zip to Documents folder
Message
De
26/09/2016 10:57:37
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01641333
Message ID:
01641336
Vues:
68
>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
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform