I have a file that lists filenames, each on it\'s own line, and I want to test if each exists in a particular directory. For example, some sample lines of the file might be
Please note, however, that using the default file systems under both Win32 and *nix there is no way to guarantee the atomicity of the operation, i.e. if you check for the existence of files A, B, and C, some other process or thread might have deleted file A after you passed it and while you were looking for B and C.
File systems such as Transactional NTFS can overcome this limitation.