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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FILE() Function With Long FIle Names

Status
Not open for further replies.

Shanachie

Programmer
Jun 18, 2000
92
US
I have a need to be able to use FILE() with long file names (quite long, actually, some are 40 chars). It appears only to recognize the first 8 chars. Interestingly, RENAME TO will rename a file to a long name but then FILE() doesn't see the difference between:

C:\Temp\Customer1-PO12345-20020207A.TXT

and

C:\Temp\Customer1-PO12345-20020207B.TXT

Note version "A" versus version "B".

Any solutions? Short of short names?

The legacy of DOS lives on.

Shanachie
 
Odd. I created the file "C:\Temp\Customer1-PO12345-20020207A.TXT" on my hard drive, and issued the following two commands. Here are the results of them on my system:
Code:
?file("C:\Temp\Customer1-PO12345-20020207B.TXT")
.F.
?file("C:\Temp\Customer1-PO12345-20020207A.TXT")
.T.
What version and service pack of VFP are you using? And what OS? The above worked on a Win2k system (SP1) running VFP6 with SP5.
 
Oops! My mistake! I was testing for the wrong filename! The FILE() test referred to a (wrong) variable containing a file name that did exist.

My error; code now works perfectly. Sorry to have bothered you with such a dumb error.

Shanachie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top