Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to Desktop
Message
 
 
To
30/11/2004 18:15:49
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00965906
Message ID:
00965920
Views:
12
This message has been marked as the solution to the initial question of the thread.
The Desktop is just a folder. After you get it's name, you can use anything to copy file. Example below uses WSH.
oShell = CreateObject("WScript.Shell")
lcDesktopFolder = oShell.SpecialFolders("Desktop")
oFso = CreateObject("Scripting.FileSystemObject")
lcFile = FULLPATH("test.txt")
oFSO.CopyFile(lcFile, ADDBS(lcDesktopFolder), .T.)
Check also How do I get the path of special folders from Windows FAQ #16022 and How do I retrieve special folders without relying on Shell.Application? FAQ #16115.

>How do I programatically copy a file (.txt) to the desktop?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform