Project

General

Profile

Actions

Bug #976

closed

If Exist cmd not working correctly always saying true whether exists or not

Added by malcolm harvey almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
12/10/2022
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

From both examples below..problem now using the If Exists cmd

B) The bug of first time no exist (false) and secondtime it does exist (true).
A) The bug always (true) in the latest version whether exists or not.
It should work either way correctly in reality.
..
eg: In the original web live version and previous to that all versions if using just the below a) ver it should work like this. It does not need to open a file first to test, because the if exist does this for you in one go.
..
a) //eg: What Brians, Paul & I have always used, (again which again all worked previously ok).
..
If Exist ("mystupiderfile.txt")
Print "yes" //do this true exists
Else
Print "no" //no not exist.
End If
..
b) //eg:Laurant's example
..
Filename$="toto"
Open Out 1, Filename$
If Exist (Filename$) = False Then Print "do not exist" // test if the file already exist
Print "exist"
Close 1
End
..
//His notes: If you use a file name for first time will say not exist, second time will say it exist

Actions

Also available in: Atom PDF