Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in Creating Directory
Message
 
To
17/11/2017 16:01:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01655649
Message ID:
01655650
Views:
53
>I want to Create a Directories in The Name of a Files at inside my Desired Location i.e sDirectory. Here is the code I am Using.
>
>
>
>DECLARE INTEGER CreateDirectory IN kernel32;
>STRING lpPathName, STRING @lpSecurityAttr
>
>sDirectory='D:\Data\Files'
>OriginalFile=E:\Data\123.pcl
>OriginalFile=E:\Data\456.pcl
>
>
>SET DEFAULT TO (sDirectory)
>CreateDirectory(JUSTSTEM(OriginalFile),0) && Does Not Create any Directory with the Required FileName
>cDIR=JUSTSTEM(OriginalFile)
>CreateDirectory('&cDIR',0) && && Does Not Create any Directory with the Required FileName
>CreateDirectory('cDIR',0) && Gives Creates a Directory with Name cDIR and Not in the Name of The File
>CreateDirectory(&cDIR,0) && Gives Error Data Type Mismatch
>CreateDirectory(cDIR,0) Does Not Create any Directory with the Required FileName
>
>
>None of the above is creating the Directory with File Name inside sDirectory. However, if I use CreateDirectory('123',0) it works fine,
>
>What Syntax To be Used I need to create Directory inside my Desired Location Like "sDirectory\123"and "sDirectory\456"
>
>Thanks

Have you tried MD command?
Previous
Reply
Map
View

Click here to load this message in the networking platform