finding renamed files

Phil Davis revdev at pdslabs.net
Sat Feb 3 14:48:23 EST 2007


What I said earlier is not true. On Mac OS X at least, the last mod date (item 5 
of each line in the detailed files) doesn't reflect name changes. Sorry!

Phil


Phil Davis wrote:
> Hi David -
> 
> If the last modified date of all non-name-changed files is the same (as 
> I suspect they would be if they came from a digital camera), you could 
> use 'the detailed files' to identify all files in the directory with 
> dates different than that 'standard' mod date. Those would be the 
> changed ones. Of course from that you won't know what was changed about 
> them, only that they were changed.
> 
> HTH -
> Phil Davis
> 
> 
> David Glasgow wrote:
>> I am looking for a quick and dirty method for walking a directory and 
>> finding files that have been renamed by the user.  I don't need to 
>> find them all, just as many as possible.  The folders are likely to 
>> originally contain matching stems and progressive numbers pjf017.jpg, 
>> pjf018 .jpg, pfj019 .jpg etc. etc, with the user renamed files 
>> standing out completely arbitrarily by not following the pattern .
>>
>> At the moment I do this using the eyeball test, which is remarkably 
>> quick and efficient but very very very boring because there are often 
>> thousands of files to scan.  One approach I thought of is to 
>> progressively filter the folders' contents by nibbling a character off 
>> the end of the first filename.  If it is completely unique (and 
>> possibly therefore renamed), nothing will happen.  However if  9 other 
>> files disappear, it was a name representative of progressive pattern.  
>> Nibble another character, and so on until it is gone, and any 
>> filenames left over didn't fit the dominant pattern in the folder.  
>> Yes?  No? .  Any other suggestions?
>>
>> Best Wishes,
>>
>> David Glasgow
>> Carlton Glasgow Partnership
>>
>> http://www.i-psych.co.uk



More information about the use-livecode mailing list