Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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?

+0
−2

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?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »