Article ID: 131407
Article Last Modified on 2/15/2000
SET DEFAULT TO <NET DRIVE>:<PATH>
X=CREATEOBJECT("CustTrackLongName")
Do While (X.FINDLONG())
.
.
<REST OF CODE TO MODIFY FILES>
.
.
ENDDO
*********************************************
* This is a class that will track *
* any long file name in the default *
* directory. *
* The class define is a property that is *
* set to true if no long file names *
* exist and false if a long file name *
* does exist. In addition, the class *
* defines a member(method) called *
* FindLong that will check to see *
* if a long filename was returned by the *
* ADIR function. *
* *
* Algorithm: *
* Input/Parameters: NONE *
* Output/Return Value: .T. No LFN *
* .F. LFN *
*LFN=Long File Name *
*********************************************
DEFINE CLASS CustTrackLongName AS Custom
Flag=.T. &&New property
PROCEDURE FindLong
iDirLength=ADIR(aMyarray)
DIMENSION aiNewarray(iDirLength)
FOR i=1 TO iDirLength
aiNewarray(i)=aMyarray(i,1)
Temp=aiNewarray(i)
TempLen=LEN(ALLTRIM(TEMP))
cOneChar=SUBSTR(Temp,7,1) && read the 7th position
&& for ~
IF cOneChar="~"
This.Flag=.F.
EXIT
ENDIF
NEXT I
IF This.Flag=.F.
RETURN .F.
Else
Return .T.
ENDIF
ENDPROC
ENDDEFINE
Additional query words: VFoxWin
Keywords: kbnetwork kbcode KB131407