Page 1 of 1
Check file whether exists or not
Posted: Wed Nov 05, 2008 10:32 am
by alemrantareq
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 ...
Posted: Wed Nov 05, 2008 10:55 am
by Mark
Dear alemrantareq,
Code: Select all
if there is a file <path to file> then...
Kind regards,
Mark
Re: Check file whether exists or not
Posted: Sun Jan 20, 2013 3:38 pm
by alemrantareq
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

Re: Check file whether exists or not
Posted: Sun Jan 20, 2013 4:03 pm
by Mark
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
Re: Check file whether exists or not
Posted: Sun Jan 20, 2013 4:05 pm
by alemrantareq
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
Posted: Sun Jan 20, 2013 4:50 pm
by Mark
Hi,
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
I still think it would have been better to start a completely new thread.
Kind regards,
Mark
Re: Check file whether exists or not
Posted: Sun Jan 20, 2013 5:26 pm
by alemrantareq
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.
