Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create directory in foxpro 2.6 win 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Anyone know how to create directories via programming in foxpro 2.6 for windows. Is there an equivalent to MKDIR? I have searched the documentation but have found no mention of it. They suggest using Filer to do the job but I need to be able to do it through the programming.

Thanks for your time .......

jslarose
 
This can be done using the FoxTools.FLL.
I've included the help entry from the FoxTools.hlp file.
MkDir( )

Creates a directory or folder.

Syntax

MkDir(cPath)
cPath

Specifies the path to create.

Return Type

Numeric

Remarks

This function will not check for the valid length and format of a directory string. The return values are:

0 success
1 no success
6 directory already exists
This function is only available in FoxTools version 1.01 or later.

Normally you'd have code something like this near the beginning of your program.

IF !("FOXTOOLS.FLL" $ set("LIBRARY"))
&& assume it's where it should have been installed !
lcfptfll = sys(2004)+"foxtools.fll"
lcfptfll = locfile(lcfptfll, "FLL", "Where is FOXTOOLS.FLL?")
IF EMPTY(lcfptfll))
WAIT WINDOW "Can't run without FOXTOOLS.FLL" TIMEOUT 30
*DO shutdown ?
RETURN
ENDIF
SET library to (lcfptfll) ADDITIVE
RELEASE lcfptfll
ENDIF

***

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top