Check file whether exists or not
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Check file whether exists or not
Hi everybody, i want to check a file named "MyFile.txt" in windows directory before my application open. If that file exists, my app will run; otherwise it will exit showing a message. Can anybody tell me that script in simple? Thanks ...
-
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Re: Check file whether exists or not
hello everyone, i need to check a file exists or not on a server. I've tried several function & command but dont understand how to cook them properly. Can anyone teach me whats the exact command to check a server file existance?
The command will be - if the file exists, it will ask to download
I've found some examples in this forum; but all r ftp based, I mean to get a file I need to know username & pass. But I'm talking about downloading from a direct link. & the file is in rar format.
replies r most appreciated
The command will be - if the file exists, it will ask to download

I've found some examples in this forum; but all r ftp based, I mean to get a file I need to know username & pass. But I'm talking about downloading from a direct link. & the file is in rar format.
replies r most appreciated

Last edited by alemrantareq on Sun Jan 20, 2013 4:04 pm, edited 1 time in total.
Re: Check file whether exists or not
Hi,
I wonder if my previous reply was useful?
Since this is a very old thread about a different subject, it is better to start a new thread.
Kind regards,
Mark
I wonder if my previous reply was useful?
Since this is a very old thread about a different subject, it is better to start a new thread.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Re: Check file whether exists or not
tnx Mark, u were always with me to help...btw, I've modified my psoting. pls take a look. 

Re: Check file whether exists or not
Hi,
Just download the file and check the result. I should be like this:
I still think it would have been better to start a completely new thread.
Kind regards,
Mark
Just download the file and check the result. I should be like this:
Code: Select all
put URL "http://ww.domain.xyz/filedoesntexist.zip" into myData
put the result into rslt
if rslt is not empty then
beep
answer error rslt
else
// continue handling the data
end if
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Re: Check file whether exists or not
tnx dear, I've checked the script; but it's not working. I mean it doesn't get the file existence. Well I'm creating a new thread. 
