Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hope to copy folder1 to folder1bak?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00173253
Message ID:
00173553
Views:
30
Hi Brenda,

Glad to hear of your success! The best place to start is the Windows Scripting Technology site. There's tons of information, and several examples (mostly in VB but their fairly easy to translate).

I believe since your not actually writing script (VBScript or JScript), you'll just need to distribute the Microsoft Scripting Run-time Library which contains the COM objects you're using. This file is included in the WSH download you've installed. There are all sorts of nifty things you can do with the WSH as well.


>Wow! Where to start? Downloaded the WSH and loaded it on my PC. Inserted your example code and it WORKED. Do not mean to sound surprised, but I thought surely there must be an something to add to the project. How or why it worked, I have no idea. Read (ok skimmed), most everything on the MSN scriping site but do not have a good understanding of all its functions and how it can be used in VFP.
>
>1) obviously I want to distribute my app. Does WSH need to be installed on my clients machines? If not, what does need to be distributed with my app to make this work?
>
>2) do you know where I can find some more info (maybe simplier and more VFP related than on MSN) on WSN?
>
>3) where can I find some more info on FileSystemObject and CopyFolder?
>
>Thanks - Brenda
>
>>Hi Brenda,
>
>>You can do this using Windows Scripting Host:
>
>>fso = CreateObject("Scripting.FileSystemObject")
>>FSO.CopyFolder("c:\folder1", "d:\folder1bak")
>
>>WSH is available for download for Windows 95, and is built into Windows 98 and NT. You'll find it along with more extensive information at Microsoft's Sripting Technologies site.
>
>>>Having trouble with the syntax. What to make a backup copy of folder1, something like folder1bak. If folder1bak exist, I will do nothing. Want to create folder1bak and then copy all the files from folder1 to folder1bak.
>>>
>>>Thanks - Brenda
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform