Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacement for =Adir and MkDir
Message
From
26/01/2000 14:59:18
 
 
To
26/01/2000 14:42:24
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00323053
Message ID:
00323074
Views:
24
>If 0=adir(aTdyDir,Left(tdy_bakpth,len(tdy_bakpth)-1),"D")
>``MkDir tdy_bakpth
>endif
>
>How do i replace this logically valid statement with one that works?
>

Calm your mind. Let the Scripting.FileSystemObject from WSH do everything:
oFSO = CREATEOBJ('Scripting.FileSystemObject')
IF ! oFSO.FolderExists(tdy_bakpth)
    oFSO.CreateFolder(tdy_bakpth)
ENDIF
>I've tried enough permutations of this structure, and i know there is a simple script object replacement that works more reliably. Can you post the code to fix this immediately, and a reference to learn more about the script objects in general? (i'd rather any alternative than using Foxpro for the nitty-gritty specifics like this)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform