Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Jorge Matheus
  Where is Jorge Matheus?
 Caracas
 Venezuela
 Jorge Matheus
 To: Victor Espina
  Where is Victor Espina?
 Linderos
 Chile
 Victor Espina
Subject: RE: if file() on windows 10 error
Thread ID: 434795 Message ID: 434892 # Views: 58 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Operating Systems
Date: Monday, March 14, 2016 3:54:28 PM         
   



Hi
I had using file() without problem for many years. I don't want to change all my code
just because this.

I've continue to dig-in the problem and found kind-of a memory problem. If i cut the code by half the
problem disappeared. Looks like one problem is corrupting all the process.

I'm doing a simple testing like

some="c:\temp\lic.txt"
if file('&some')
? "File found"
else
? "file not found"
endif

some="c:\temp\licxxx.txt"
if file('&some')
? "File2 found"
else
? "file2 not found"
endif

When i cut the code by half; on the first segment the file is found and in
the second segment the file was not found, as it should.

But with all the code in place, if statment seem to become corrupted and
start having problems. In this case both segment give "file found" message
which is incorrect. Later in other segments, the if statment become complete
corrupted and start giving error by the IF line itself.

Now i'm thinking there is nothing related to win 10, but something else.

I'll keep you guys posted with new findings

Regards



> As Tore said, FILE() is not 100% trustable. I have had some problems using it in hosted environments, where FILE() can return FALSE for existing files. I create a IsFile() and IsFolder() funcions, using WSH:
>
>
> FUNCTION IsFile(pcFile)
>  LOCAL oFSO
>  oFSO = CREATE("Scripting.FileSytemObject")
>  RETURN oFSO.FileExists(pcFile)
> ENDFUNC
> 
> FUNCTION IsFolder(pcFolder)
>  LOCAL oFSO
>  oFSO = CREATE("Scripting.FileSytemObject")
>  RETURN oFSO.FolderExists(pcFolder)
> ENDFUNC
> 

>
> > Hi
> >
> > I tested all my programs in WIN 10 and everything was working very well,
> > now i'm experience a weird problems with the line
> >
> > if file('&some')
> >
> > where some is the name of a file. It say there is error in this line.
> >
> > This start to happen after a new window 10 updates. Has someone else
> > has this problem. It is getting me crazy.
> >
> > Regards
> > Jorge
>
>
>
> /* ---------------------------------- *\<br />> Victor J Espina S
> www.victorespina.com.ve/wiki
> "Change is the only constant in the Universe"

ENTIRE THREAD

if file() on windows 10 error Posted by Jorge Matheus @ 3/10/2016 11:35:24 PM
RE: if file() on windows 10 error Posted by Koen Piller @ 3/10/2016 11:46:27 PM
RE: if file() on windows 10 error Posted by Rahul Moudgill @ 3/11/2016 3:42:24 AM
RE: if file() on windows 10 error Posted by Tore Bleken @ 3/11/2016 8:18:52 AM
RE: if file() on windows 10 error Posted by Nadeem Shah @ 3/12/2016 5:35:22 AM
RE: if file() on windows 10 error Posted by Mike Yearwood @ 3/13/2016 7:06:36 PM
RE: if file() on windows 10 error Posted by Nadeem Shah @ 3/14/2016 1:10:52 PM
RE: if file() on windows 10 error Posted by Mike Yearwood @ 3/14/2016 2:22:47 PM
RE: if file() on windows 10 error Posted by Nadeem Shah @ 3/14/2016 4:38:15 PM
RE: if file() on windows 10 error Posted by Fernando Bozzo @ 3/14/2016 4:54:01 PM
RE: if file() on windows 10 error Posted by Gene Wirchenko @ 3/14/2016 6:02:54 PM
RE: if file() on windows 10 error Posted by Fernando Bozzo @ 3/14/2016 7:11:45 PM
RE: if file() on windows 10 error Posted by Gene Wirchenko @ 3/16/2016 6:17:44 PM
RE: if file() on windows 10 error Posted by Mike Yearwood @ 3/16/2016 10:04:30 PM
RE: if file() on windows 10 error Posted by Gene Wirchenko @ 3/20/2016 8:26:58 AM
RE: if file() on windows 10 error Posted by Tore Bleken @ 3/14/2016 5:19:36 PM
RE: if file() on windows 10 error Posted by Nadeem Shah @ 3/14/2016 7:39:38 PM
RE: if file() on windows 10 error Posted by Victor Espina @ 3/12/2016 4:09:52 PM
RE: if file() on windows 10 error Posted by Jorge Matheus @ 3/14/2016 3:54:28 PM
RE: if file() on windows 10 error Posted by Victor Espina @ 3/14/2016 5:52:09 PM