Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADir and Long Filenames
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01041216
Message ID:
01041537
Views:
21
Paul,

Are you passing them as & macro expanded parameters? If so you'll get errors if the name contains any spaces.
lcFileName = "this is my really long filename.txt"
strtofile( "test", lcFileName ) && create the file

? file( lcFileName ) && works
? file( &lcFileName ) && errors because of the space
>I am having a real frustrating time using ADir() and File(). Both of them take a file name for a parameter, but both of them fail when passed a Long Filename. Well, they don't fail all the time, like in my test code, but they do fail in my production code. I'm sure the difference is some arcane "SET" command or environment setting, but I don't need this kind of help going insane!
>
>Does anybody know what environment settings would make adir() or file() fail when passed a long filename?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform