Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing a file to the desktop
Message
De
10/11/2014 00:07:57
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01610493
Message ID:
01610798
Vues:
82
Sorry I took so long getting back. There were some user issues, and other things to distract me for a while.

I chose to work with the approach offered below because I wasn't familiar with WScript.Shell (although both suggested approaches look clean). In any case, this solution worked like a charm.

With only a folder name, and the third line below for me to add, everything was done.
cUprof = GETENV("USERPROFILE")
cDesktopFolder = ADDBS(m.cUprof) + "Desktop\MyFolderName"
MkDir (cDesktopFolder)

I do have my own wrapper around MkDir though, in case there's already a folder there by that name.

Thanks
Bob


>>I can create a folder programatically from VFP as C:\stuff, but I want to create it on the Windows desktop, and create files from VFP and put them into that folder that's on the desktop. What's the right way to reference the desktop so that I can do this?
>>
>>Bob
>
>It can be referenced as a regular folder, i.e.
>C:\Users\yourUsername\Desktop
>or better yet
>
>cUprof = GETENV("USERPROFILE")
>cDesktopFolder = ADDBS(m.cUprof) + "Desktop"
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform