💡
18
c/coding-for-beginners•grays13grays13•3mo ago

Vent: My 'simple' Python script deleted a whole folder of my photos because I messed up a path.

I was following a tutorial on file handling, typed './images' instead of './images_backup', and ran the cleanup function before I realized my mistake, so has anyone recovered files after a coding blunder like that?
4 comments

Log in to join the discussion

Log In
4 Comments
davis.noah
davis.noah3mo agoMost Upvoted
Used to think backups were overkill, but a similar mistake changed my mind fast.
10
blair_taylor32
Got a backup before the tutorial?
1
jenny47
jenny473mo ago
Learned that lesson the hard way too.
0
elizabethmason
Oh wow, you seriously went all in without a backup? That's wild to me, @blair_taylor32 probably feels the same way I do about that move. I guess we all have to learn somehow, but man, that's a hard way to do it.
0