A search utility to find invalid dates, times and filenames on a server?
May 11, 2011 10:18 AM   Subscribe

Anyone know of a good utility to find invalid filenames and (this could be a separate app) invalid created/modified dates on a server? It can be on any platform, but a good UI is preferred.

I have a SMB server of 8TB that contains files with invalid creation and modified dates so I would like a utility that will scan the server and locate these files so I can delete or correct them. On the same server are some with filenames that are not valid to copy from the SMB server to a windows 7 NTFS volume because of some extended characters. I would also like to locate and rename those.

This could be a single utility or two and it can be on Mac, Windows or Linux. I would prefer not to have it be command line only and to have a decent interface. The end result is to allow easy mirroring between server and a local volume using an automated syncing utility (but that part works ok)
posted by milovoo to Computers & Internet (7 answers total)
 
What exactly is an invalid created/modified date?
posted by rhizome at 10:30 AM on May 11, 2011


why aren't the filenames copyable ? (I ask only b/c in a previous life, I spent a lot of time dealing with intricacies of Win32 and unicode and how it applies to file names. ) Do they show up in explorer ? Can you double click to open them ? Can you copy via explorer ? Can you copy them programatically ?

Similarly, what are your criteria for bogus dates ? In the future ? Windows does some interesting things in the metadata for those various things (access/modified/created etc)..
posted by k5.user at 10:33 AM on May 11, 2011


What exactly is an invalid created/modified date?

A file with a creation/modification/access time somewhere in the dystopian future (i.e., anything past this very instant).
posted by matlock expressway at 12:24 PM on May 11, 2011


I know you said you don't like CLI, but this is by far the easiest way to get a simple list of files with invalid timestamps:

touch -t [YY]MMDDhhmm randomfilename
find /directory -type f -newer randomfilename -print

The first command creates a file with whatever name you choose and with whatever timestamp you choose. The second finds any file in whatever directory you choose which is newer than the file you just created.
posted by matlock expressway at 12:33 PM on May 11, 2011 [1 favorite]


Response by poster: It took me a while to find (thus the need for the utility) but one of the problem characters is "" (not sure how that will post so let's call it UTF8-EF80A8 or unicode-F028.

The problem dates are a bit tougher to track down as I corrected the ones I found manually before I thought to ask the group, but I remember that the year showed as 20228, whether this was corruption of the displayed value or an actual calculated value from the far future I am not sure.

SyncToy gives me the invalid "Win32 filetime" error but that is not the only problem I have encountered with dates. I was hoping that there was just a utility on some platform that would allow me to search for these kind of errors and weed them out. Maybe not.

I remember that an old version of Norton Utilities would tell you if there were dates that could not possibly be valid, but the new version does not seem to do that and my searches turned up some utilities for specific types of servers but not a general utility to find any dates before (let's say) 1901 and after 2012. Maybe people just write scripts to do this for themselves and don't bother to create a UI for it. Too bad really as I was hoping that some general utility would exist for this need.
posted by milovoo at 7:44 PM on May 11, 2011


Response by poster: also k5.user, I am willing to work through your additional tests and questions but I'm wondering before I start - do you have an end result in mind?

Are you trying to determine which utility will work best in my particular case?

Would it perhaps be an option to start with your potentially recommended utility and work backwards?
posted by milovoo at 8:08 PM on May 11, 2011


My utility would be one I'd write, probably ... ;) (viz data set size and time to run .. ).. The time could, I think, be easily done via a unix script (take your pick, I'd probably do some shell work, not perl/python..)

What is the outcome of files with the bad character ? Do they display wrong ? Are they un-openable ? Would you want some/any/all non-US-ASCII chars replaced with some other value ? Some characters are valid on one OS, but not on another ..
posted by k5.user at 8:38 AM on May 12, 2011


« Older What Shakespeare play best fits an unofficial...   |   Where are the Gyms/Health Clubs with Saltwater... Newer »
This thread is closed to new comments.