Help altering function that checks timestamp of file.

  • My current function checks a file path and returns its timestamp, ex: A1 has Oz/Grid.csv, use the function in B1 and get the time it was created.


    However if my file is Oz/Grid_*.csv in A1 , the function returns a default value , im guessing because there are many files that the wildcard could apply to . So because the wildcard checks for every file with that name and usually the folder that contains the file I look for has file names such as Oz/Grid_1.csv , Oz/Grid_2.csv, etc.


    How can I get this function to search for the max wildcard value and return that instead of returning a default value?



    any help would be greatly appreciated.
    Thanks

  • Re: Help altering function that checks timestamp of file.


    Use the old DIR & FileDatetime functions - less hassle than the FileSystemObject


    This expects a fully qualified file name, or mask. "c:\temp\filename.csv" or "c:\temp\book*.csv" and returns the date and time of the newest matching file.

  • Re: Help altering function that checks timestamp of file.


    Awesome, works really good for my wildcard file paths!! How come the times differ slightly between our functions? Are yours taking the date modified? Just curious.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!