This should be a very easy question for all Clipperheads around.
Can I create directories from pure Clipper language?
If so, how?
Thanks in advance
>Can I create directories from pure Clipper language?
I suppose that depends on how you define "pure" :-)
Clipper itself has no such function but Clipper Tools has. FUNCky also
has one. And GT_Lib. The latter is public domain and can be found at
the Oasis.
HTH,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
Yes
1 - Nanforum library from the OASIS (MKDIR())
2 - Clipper Tools III (MakeDir() or is it DirMake())
3 - Shell to DOS and use the 'MD' command
--
HTH
Steve Quinn
"Carlos Andres" <cac0...@terra.es> wrote in message
news:1103_10...@news.terra.es...
Carlos Andres wrote:
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
cMyNeedFulDir := "c:\mydir"
cMacro := "mkdir " + alltrim( cMyNeedFullDir )
run &cMacro
That's all ! With best regards ! Rimantas .
"Carlos Andres" <cac0...@terra.es> wrote in message
news:1103_10...@news.terra.es...
IF LEN(DIRECTORY('C:\GT2TEMP','D')) == 0
DIRMAKE('C:\GT2TEMP')
ENDIF
i always use this UDF (which uses ca-tools functions) i made a few
years ago. use it to (4dos / bash style) push / pop a dir like cDir :=
pushdir("c:\foo\bar") ; do_it() ; popdir(cDir). you can also force the
creation of the directory. it uses some simple recursion to go back to
the starting point. return value is name of current drive + dir or an
empty string when it fails.
use at your own risk, distribute freely, blah, etc. etc.
function pushdir(cDir, lCreate)
local cCurrent := diskname() + ':\' + curdir()
if cDir == NIL ; return ('') ; endif
default lCreate to .f. // if NIL, .f.
cDir := delslash(cDir)
if diskchange(substr(cDir, 1, 1))
if len(cDir) > 2 // there's a path
if dirchange(substr(cDir, 3, len(cDir))) != 0
// we can't get there...
if lCreate// ...may we create?
if !(makedir(substr(cDir, 3, len(cDir)))) == 0
// it didn't work, restore dir...
pushdir(cCurrent)
// ...and return a failure
cCurrent := ''
endif
else // makedir is a no go, leave
pushdir(cCurrent)
cCurrent := ''
endif
endif
endif
endif
return (cCurrent)
function delslash(cString)
// remove a backslash when it's the last part of a string, unles the
// string is 3 pos long (then it's probably a drive)
cString := alltrim(cString)
if len(cString) > 3
if substr(cString, len(cString), 1) == '\'
cString := substr(cString, 1, len(cString) - 1)
endif
endif
return (cString)
--
Jules Alberts
Martin,
Me too, but this requires version 5.3x. DIRMAKE is not available in
previous versions.
Lee Clinkscales
See header:Organization for obvious change to email address
Regards from Málaga (Spain)
Alvaro
Carlos Andres <cac0...@terra.es> wrote in message news:<1103_10...@news.terra.es>...
--
Posted via dBforums
http://dbforums.com
There is no such function in built-in to 5.2. Did you even read the rest of
this thread?
--
Ray Marron