Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid subscript reference
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173721
Message ID:
01173898
Views:
14
>>Filer can not work with masks like *Letters*.jpg
>
>I think somethink is wrong in your code or You have something
>misprinted. No one errors with Filer all time when I work with it.

This is my test program (I commented the Filer part). Do you see, where I'm wrong?
*!*	#define crlf CHR(13) + CHR(10)
*!*	oMyFiler = CREATEOBJECT('Filer.FileUtil')
*!*	oMyFiler.SearchPath = "t:\jpg"
*!*	oMyFiler.FileExpression = '*e4*.jpg'
*!*	oMyFiler.Find(0)
*!*	=MESSAGEBOX(oMyFiler.Files.Count)
*!*	_cliptext = ""
*!*	FOR EACH loFile IN oMyFiler.Files
*!*		_cliptext = _cliptext + loFile.Name + CRLF
*!*	NEXT
ltTime = DATETIME()
CREATE CURSOR crsTest (FieldName C(50))
lcFileName = SYS(2000,[t:\jpg\*.jpg]) && All files
DO WHILE NOT EMPTY(lcFileName)
*!*	   IF LIKE(UPPER(myStemPart), UPPER(JUSTSTEM(lcFileName))) OR;
*!*	      LIKE(UPPER(myExtPart), UPPER(JUSTEXT(lcFileName)))
*!*	      
*!*	   ENDIF
	INSERT INTO crsTest VALUES (m.lcFileName)
   lcFileName = SYS(2000,[t:\jpg\*.jpg],1)
ENDDO
=MESSAGEBOX(DATETIME() - m.ltTime)
=MESSAGEBOX(RECCOUNT('crsTest'))
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform