Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
How to automatically select new bulk downloads, and delete downloads deleted months ago?
I bulk download pictures from a website, like Instagram, with WF Downloader to a folder. then I delete some of these pictures.
Two months later, this Instagram uploads many new pics. I bulk download from this instagram again. But I want just the new pics from this Instagram in the last two months. I don't want the pics that I deleted. I don't want to have to delete these pics again, when I deleted them two months ago.
How can I use computer program to automatically single out the new Instagram pictures within these last two months?
1 answer
Write a script to find the old files. Once you have a full treename of a file, it's trivial to delete it. Pretty much any command shell should be able to do this. Here is an example using my scripting language, ESCR:
// SHOWOLD date // // Show all the files in the current tree that are older than DATE. The // format for DATE is YYYY/MM/DD. // var new thdate time = [arg 1] //////////////////////////////////////////////////////////////////////////////// // // Subroutine OLDFILE tnam // // TNAM is the full treename of a file older than the threshold date/time. // subroutine oldfile var local tnam string = [vnl [arg 1]] show "Old file " tnam endsub //////////////////////////////////////////////////////////////////////////////// // // Subroutine DODIR // // Process all the files in the current directory and any of its // sub-directories. // subroutine dodir var local olddir string = [dir] loop dir "." pick one by [dent type] option "DIR" dir [dent] call dodir:+1 //process subdirectory recursively dir olddir option "FILE" if [< [dent dtm] thdate] then //older than the threshold ? call oldfile [dent tnam] endif endpick endloop endsub //////////////////////////////////////////////////////////////////////////////// // // Start of main routine. // show "Files older than " thdate ":" call dodir
Since I didn't actually want to delete files on my system, I have it only show the name of each old file. However, you could make subroutine OLDFILE do whatever you wanted, including deleting the file.
If you want to run the above script directly, you'll have to install my ESCR scripter. It is included in the Full Runtime release at http://www.embedinc.com/pic/dload.htm.
Again, similar things can be done with other scripting languages and most command shells.
0 comment threads