Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in Creating Directory
Message
From
20/11/2017 15:01:46
 
 
To
20/11/2017 14:21:01
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:
01655728
Views:
59
test this code and see the syntaxes used.
If !Directory("d:\data")
	Md "d:\data"
Endi

If !Directory("d:\data\green")
	Md "d:\Data\green"
Endi

Local sDirectory,oFilename  &&as your question
sDirectory="d:\data\green\"
oFilename="Soaps"
If !Directory("d:\data\green\soaps")
	Mkdir "d:\data\green\soaps"
Endi
*can use
*If !Directory(addbs(m.sDirectory)+m.oFilename)
*	Mkdir addbs(m.SDirectory)+m.oFilename
*Endi

*first instance explorer.exe
Run/N explorer "d:\data\green\soaps"  &&see the folder in explorer

*second instance explorer.exe with another syntax
Local m.o
m.o=Addbs(m.sDirectory)+m.oFilename  &&addbs adds a "\"  at end path if there is not one
Run/N explorer  &o  &&see the folder in explorer-here used a macro substitution in line command-can use shellexecute.


*can delete the d:\data\green\soap folder used for this test only
note: for using highlight syntaxe inside this site put your code between the tags < pre > and < /pre > (witout the spaces).
Previous
Reply
Map
View

Click here to load this message in the networking platform