Since the FileExists function uses FindFirstFile, do you think it's safe to use it to find a file with a wildcard? I want to create a log file with the date in the file name. If the file isn't there, it will create it, and if it is , it'll use it.

Since the FileExists function uses FindFirstFile, do you think it's safe to use it to find a file with a wildcard? I want to create a log file with the date in the file name. If the file isn't there, it will create it, and if it is , it'll use it.

For ex. LogFile20170904.log

I want the file to have the date so that we can archive them periodically and not have to rename them each time.

The FindFirstFile takes a wildcard.

Comments

  1. Phillip Woon ExistsLockedOrShared is only called if a lock may exist, not if the file doesn't exist or the path is invalid.

    ReplyDelete
  2. Yes, so FindFirstFile is what I would use

    ReplyDelete

Post a Comment