DEV Community

Discussion on: Automating Simple Things with Python is Awesome

Collapse
 
alialhajji profile image
Ali Alhajji

I once faced a similar issue. My boss, who isn't an IT guy at all, wanted to change the extension of many files. He told me to do it (for I was the new hire then). All the files had a common extension. I did not have to write a code to automate it, I just opened cmd and used the command (rename *.zip *.xlsx)

that's it!

As I was reading through your post, this solution kept popping up in my mind. But then I realized that you had different extensions to change.

Collapse
 
rpalo profile image
Ryan Palo

Yeah, it would have been a lot easier if I hadn't needed to preserve some amount of the original extension. But definitely a PowerShell one-liner was my first thought.