[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestions on mechanism or existing code - maintain persistence of file download history

On Thu, Jan 30, 2020 at 7:49 AM MRAB <python at> wrote:
> On 2020-01-29 20:00, jkn wrote:
> > I could have a file with all the URLs listed and work through each line in turn.
> > But then I would have to rewrite the file (say, with the previously-successful
> > lines commented out) as I go.
> >
> Why comment out the lines yourself when the download manager could do it
> for you?
> Load the list from disk.
> For each uncommented line:
>      Download the file.
>      Comment out the line.
>      Write the list back to disk.

Isn't that exactly what the OP was talking about? It involves
rewriting the file at every step, with the consequent risks of
trampling on other changes, corruption on error, etc, etc, etc.