Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if file exists only in a particular place
Message
From
08/10/2007 18:59:40
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/10/2007 14:37:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01258744
Message ID:
01259612
Views:
23
>>
>>No. In this case file(...) and !empty(sys(2000), ...) are doing the same thing. Toss a coin and choose one.
>>Cetin
>
>File() may have some problems that sys(2000.. may not have. I think that sys(2000 is be just a wrapper to FindFirstFile and FindNextFile, so it should work under all circumstances.
>
>File() has problems when the path does not include any folders, or if you use an UNC path, and may give false positives.
>
>
>m.lcDefault = Set("DEFAULT")
>m.lcPath = Set("PATH")
>
>Mkdir C:\TEST001
>Mkdir C:\TEST001\TEST002
>
>Set Default To C:\TEST001
>Set Path To C:\TEST001\TEST002
>
>m.lcFoo = "12345678"
>
>Strtofile(m.lcFoo, "c:\test001\test002\test003.txt")
>
>?'File("test003.txt")', File("test003.txt")
>?'File("c:\test001\test003.txt")', File("c:\test001\test003.txt")
>?'File("c:\test003.txt")', File("c:\test003.txt")
>?'File("\\someserver\somefolder\test003.txt")', File("\\someserver\somefolder\test003.txt")
>
>Chdir (Home(0))
>
>Delete File "c:\test001\test002\test003.txt"
>Rmdir C:\TEST001\TEST002
>Rmdir C:\TEST001
>
>Set Default To (m.lcDefault)
>Set Path To (m.lcPath)
>
>
>Carlos Alloatti

Try with application.servername.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform