Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing if file exist 1

Status
Not open for further replies.

berthoud

Technical User
Oct 31, 2010
51
FR
Hello word,

I'm back lol

Is't possible to test if a dos file (ex: 'Photos/mypicture.jpg')exist?

May be by using "Directory"? Is there an other way?

Thank you for your help

Have a good day
 
Hi,

IF EXISTS('C:\Test\Test.log')
Do ...
ELSE
Do ...
END


cagiv
 
Thanks

I had not found "exists" in my "language reference" book but it works very well.

Good evening
 
Hi!

You can use EXISTS() to check if a folder exists by using

IF EXISTS('C:\Test\')
...

or

IF EXISTS('C:\Test\.')
...

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top