Hello everyone,
Can I ask how to check if the file is already exist in a location.
Any help will be very much appreciated
Thank you..
-snop21
Checking the file if it is already exist in a specific loc.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Checking the file if it is already exist in a specific l
Code: Select all
if there is a file tMyFilePath then
DoSomething
else
answer "The file "& quote& tMyFilePath "e&" cannot be found."
end if

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Checking the file if it is already exist in a specific l
-- FourthWorld
Thank you for welcoming me here..! I am new in livecode..! I really find it interesting!..
)
if there is a ----> file <--- tMyFilePath then
DoSomething
else
answer "The file "& quote& tMyFilePath "e&" cannot be found."
end if
I have a followup question the file word there is the name of the file that I am referring to?
Many Thanks..
-snop21
Thank you for welcoming me here..! I am new in livecode..! I really find it interesting!..

if there is a ----> file <--- tMyFilePath then
DoSomething
else
answer "The file "& quote& tMyFilePath "e&" cannot be found."
end if
I have a followup question the file word there is the name of the file that I am referring to?
Many Thanks..
-snop21
Re: Checking the file if it is already exist in a specific l
Hi snop21,
put "C:\Users\snop21\Documents\theFile.txt" into tMyFilePath
Now does Richard's code make sense?
Simon
put "C:\Users\snop21\Documents\theFile.txt" into tMyFilePath
Now does Richard's code make sense?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!