>Robert,
>>>
>>>You're not missing anything. Not all folders expose all the date/time properties. I was able to duplicate what's happening to you with the following:
lcdir = GETDIR()
>>>oDir = oFSO.GetFolder(lcdir)
>>>? oDir.DateCreated
The workaround is that
? TYPE('oDir.DateCreated')
returns "U". If it's "T", then you can access the property.
>>
>>Ouch.. that must've been it.. I just ran it on a slave drive that had no system files in it and it didn't give the error...
>>
>>hmm.. maybe an if.. endif.. statement then where if the type is u it won't try for the .datecreated and if it's t then it will....
>>
>>OR.. I can just tell the network manager tough doodoo. he'll have to settle with just datelastmodified :) but I guess a few extra lines of code won't hurt anything.. :)
>>
>>Thanks for the catch.. I was getting ready to pull my hair out for awhile there :) hehe
>
>You're welcome. You could also try something like:
WITH oFolder
>INSERT INTO filesFSO (Path, Filename, Size, Created, Modified);
> VALUES (.Path, .Name, .Size, IIF(TYPE('oFolder.DateCreated') # 'U' ,.DateCreated, DATE(1900, 1, 1)), .DateLastModified)
>ENDWITH
It's a minimal change, and would probably require that some other code would have to be modified to recognize the date chosen to represent the fact that the real date couldn't be pulled.
ahh.. I keep forgetting about IIF statements.. yea I like that much better then if.. endif. :) I always prefer cutting code out as apposed to putting code in :)
thanks again
Robert Herrmann
Texas Cancer Registry