Checking for existing File in Directory...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmudgett
    New Member
    • Aug 2006
    • 1

    Checking for existing File in Directory...

    Hello -

    I am new to programming and I need some help.

    I have an application that writes a file to a specified directory using the following

    FileName = String.Format(R eportFileNames( ReportType), Format(Now, "yyyyMMddHHmmss "))

    I need to now check before I create the file to make sure that there is no file that has a creation date within the last 15 minutes.

    Please help. And if you have examples or a location to find the answer that would be great. I need to learn this. Thanks in advance.
  • Enyi
    New Member
    • Jul 2006
    • 38

    #2
    If your using .NET, then there is a method called 'Exists' in the System.IO.File namespace, which you can use to check whether it exists.

    I'm not sure about the date thing.

    Comment

    • krodman
      New Member
      • Aug 2006
      • 12

      #3
      IO.File.GetCrea tionDate(filePa th)

      Comment

      Working...