Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

error" file does not exist"

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR-DOS
View previous topic :: View next topic  
Author Message
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Sat Apr 18, 2015 9:04 am    Post subject: error" file does not exist" Reply with quote

hello
First of all many many thanks for AVR-DOS (I will send you my licence fee when my proto will be working)

every day, I have to open a file of the type "dd_mm.txt". Sometimes the file is not created, because it has not yet registration for that day.
How to make a test of the kind:

If "dd_mm.txt" exists then
....
else
.....
end if

in other words how to find and manage an error" file does not exist"

Thanks much for your help

jp Confused
Back to top
View user's profile Visit poster's website
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2156

netherlands.gif
PostPosted: Sat Apr 18, 2015 1:54 pm    Post subject: Reply with quote

Hi Jp,

Something like this
Code:

lFileLen = filelen(MyFileName)

If lFileLen > 0 then
.
else
.
end if
 

_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Sat Apr 18, 2015 2:58 pm    Post subject: Reply with quote

many thanks Evert,

I use
If Filelen(stb_month_day) > 0 Then
---
endif

and it works too.
JP Wink
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR-DOS All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum