I want to check to see if a file exist such as
if exists file (“C:\test\info.txt”) then
Output the the file location C:\test\info.txt
I want to check to see if a file exist such as
if exists file (“C:\test\info.txt”) then
Output the the file location C:\test\info.txt
So are you looking for something like …
If (Exists File "info.txt" of Folder "C:\Test") THEN (Pathname of File "Info.txt" of Folder "C:\Test") Else (Nothing)
how would a get the last modification date and time of the file and out put that as well.
If (Exists File “info.txt” of Folder “C:\Test”) THEN ((Pathname of it, modification time of it) of File “info.txt” of Folder “C:\Test”) Else (Nothing)
This is all you need to test if a file exists, and if so, output the pathname:
pathnames of files "C:\test\info.txt"
If you need more info, then just do the following:
(pathnames of it, modification times of it) of files "C:\test\info.txt"
There is no need for the extra complication of IF/THEN/ELSE if you use plural relevance, which you should almost always use plural relevance, except for in very rare circumstances.