Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone.
I need to make a condition to check for the existence of files, something like this:
(if (and
(findfile "D:\\File1.txt")
(findfile "D:\\File2.txt")
(findfile "D:\\File3.txt")
)
(progn ...)
)
The problem is that the names of all the files are included in the list
'("File1" "File2" "File3")
thus, it is necessary to check the existence of all files in the list. I tried to do the following:
(if (foreach f
'("File1" "File2" "File3")
(findfile (strcat "D:\\" f ".txt"))
)
(progn ...)
)
but this always returns true whether the files exist or not. How can I check the existence of files in this case?
Solved! Go to Solution.