I have a server that collects jpeg images from security cameras. Each camera has a folder on the server into which it deposits the images. Due to the large number of total images, some organization and eventual deletion of images is necessary.
I currently have made a powershell script that gets the camera directory listing, and loops through this list. For each camera, the script gets directory listing, checks if the file is a directory or a picture. If the directory item is a picture, the script places it into a subdirectory based on picture date. Otherwise, if the directory item is a subdirectory, it's date is checked, and if it is older than x number of days, the directory and all the images from that day are deleted.
Unfortunately with addition of more cameras, and higher resolution footage, the powershell script goes crazy on memory usage, and sometimes doesn't even seem to finish successfully.
I am trying to see if I can somehow optimize the script, or move to another scripting or programming language. If I do have to move to another language, which one would you recommend?
As far as scripting, I really don't know how different scripting languages deal with directory info storage and or garbage collection. As far as programming languages go, I am guessing that C++ will offer the best performance, but I don't know off the top of my head how easy it will be to do these file system operations, and which libraries I would need to use. I am guessing that C# would take less time to create the program, but might be as bad as powershell at performance since they both use .NET?
Thanks in advance!
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









