does directory exist?

Post Reply
User avatar
clemerson
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil
Contact:

does directory exist?

Post by clemerson »

Hi,

Which the best form for a directory to be seen exists?

example:
C:\BA

* he doesn't have any file in this directory

Clemerson
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post by George »

Clemerson

lIsDir(cDirectoryName)

return .T. if exist, else return .F.

Regards


George
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

see this sample :
I hope it good for you


Code: Select all

 
cIni :=GetWinDir()+"\Classroom.Ini"
cTem :=GetPvProfString("Classroom","DirDat","",cIni)
cDir :=IF(!Empty(cTem),LFN2SFN(cTem),cTem)
cNSys:="ClassRoom"

IF !Empty(cPar) .AND. cPar=="/L"
      cPath:=CurDrive()+":\"+CurDir()+"\"
   ELSE
      cPath:=IF(!Empty(cDir),cDir,"\"+CurDir()+"\")
   ENDIF
   IF Empty(cTem)
      cPath:=CurDrive()+":\"+CurDir()+"\"
      WritePProString(cNSys,"DirDat",cPath,cIni)
   ENDIF
Best Regards, Saludos

Falconi Silvio
User avatar
clemerson
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil
Contact:

Post by clemerson »

tank's

Clemerson
Post Reply