Archived

This topic is now archived and is closed to further replies.

renaming files using c++?

This topic is 5368 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

say i had a directory of files that all had capital letters and i wanted to rename them all to lowercase, how would i do that? i know how to convert case stuff, that is not the problem, but how do i control outside files with a program? i looked at http://www.cplusplus.com/ref/iostream/fstream/ which can open/close files, but i could not find anything about renaming so i need to be able to 1. get directory contents 2. get a string form of each file name 3. change string 4. rename file to new string name i assume i need like dos implementation or something? i don''t know that''s why this is in "for beginners" hehe, i am allowed to be uninformed :>

Share this post


Link to post
Share on other sites
This is the fourth C++ filesystem question I''ve seen tonight. What''s everyone up to??

two pointers:

rename()

http://www.boost.org/libs/filesystem/doc/index.htm


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
hrmm
i did an all forum search for "renaming files" and didn''t find anything interesting
checking out link now, thanks

Share this post


Link to post
Share on other sites