Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FILE() UNC
Message
From
20/05/2009 08:28:05
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
20/05/2009 04:23:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01400867
Message ID:
01400880
Views:
43
Hi,

Thanks for the input, I went with the ADIR which I should have thought of myself really!

Anyway thanks again.

Jon

>>Hi All,
>>
>>I have a problem where I am using the FILE command to check for a file within a specifc directory, so:
>>
>>IF FILE(p_instpath + "PPWIN.ICO")
>>
>>if it doesnt exist the program should just move on, but if it does exist then it needs to copy in a new version of the file.
>>
>>This works perfectly when using a mapped drive but if you use a UNC it causes an error because the FILE doesnt just searc the specific directory but searches through the search path and finds the old version of the file in the application directory and then things go wrong.
>>
>>Is there anyway I can force the FILE command to just check in the specific location, or any other alternative approach I could take.
>>
>>Any help appreciated.
>>
>>Thanks
>>
>>Jon
>
>Jon,
>
>Does this work ?
>
>
>declare Integer GetFileAttributes in win32api string @ && once
>*--------------------------------------------------------------------------
>Function	FileExists(FileName)
>	return (GetFileAttributes(@m.FileName) <> -1)
>endfunc
>*--------------------------------------------------------------------------
>
Previous
Reply
Map
View

Click here to load this message in the networking platform