• HereIAm@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    9 hours ago

    The first time I accidentally lost a number of files was when I wrote a script to rename some images from the format ddmmyyyy to yyyy-mm-dd. But I put the parsing and saved the variable only once outside the for loop, so all files ended up overwriting each other. Learnt my lesson to run untested scripts on files without a back up