The webcam puts the picture in a directory accesible by Apache.
One uses javascript in an html page to dynamically update a webcam webpage.
The webcam overwrites the previous picture taken.
The old picture ends up in the Recycle bin.
After a while, one collects hundreds of images 'webcam.jpg' in the Recycle Bin...
Windows doesn't provide you with an option to restore these files - without one overwriting the other (remember, they have the same name (and came from the same source location/directory).
Here's how I rescued my old webcam pictures:
| fd |
fd _ FileDirectory on: 'C:\RECYCLER\S-1-5-21-527237240-515967899-725345543-500' .
fd entries do: [ :fde |
(fde name matches: '*.jpg') ifTrue: [
fd copyFileNamed: fde name toFileNamed: ('c:\webcam\webcam_', ((DateAndTime fromSeconds: fde modificationTime) asSortableString), '.jpg') ] ]
The above script will run on --probably-- any Squeak (-: and/or :-) Smalltalk.
Let me know if you've crafted a wicked variant on the above...
No comments:
Post a Comment