Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in Creating Directory
Message
From
18/11/2017 03:33:49
 
 
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:
01655661
Views:
51
1)sDirectory and OriginalFile must wrote with comas ["] at begin and end
2)modern vfp dont use & go to m dot its better and avoid some errors where there is spaces in string.
3) '&cDir" is evalued as &cDir as a string.use m.cdir
4)comment in prg must begin with : &&Does Not Create any Directory with the Required FileName
or * at the begin of line

5) for use of CreateDirectory API can read this sample can help you : http://www.news2news.com/vfp/?example=1&function=1

At the end vfp made all these exercices in one native commad:MKDIR or MD
its also as it in msDOS command.
very simple to use:
try  &&avoid error if folder to create already exists.
MD cPath   && or  MKDIR cPath
catch
messagebox("folder already exist!",16+4096,"error")
endtry 
use APIs when you dont have a vfp explicit language solution only.

note: see also RMDIR to remove a folder.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform