I want to write a program that automatically renames all the files in a directory when given a directory. It also needs to rename the files in other directories within the source directory. For example, I have a lot of files, in directories within directories which have an extension .ut attached to them by uTorrent(it does this until the files are being downloaded and removes it when the download is complete however, in my case for some reason the extension hasn't been removed because of some reason). Therefore, in order to make the files workable, I need to fix their extension.
I'm quite familiar with c++ so I plan on writing this program in c++. I have broken down the problem and I have some idea how I'm going to do it. However, I need help with 2 things currently.
- What method will I use to input each file in order to rename it.
- What method will I use to move through the directories.
A simple code or a link that explains any of the above will suffice.
If there already exists such a tool, it would be great if someone points me to its source.
I know my question is a bit vague but I don't need precise answers. I just need someone to point me in the right direction. I know it is possible in PHP but I want to do it in c++.
Aucun commentaire:
Enregistrer un commentaire