Reputation: 318
working with W7 and visual studio. My problem today is that I can't rename external files outside my project directory. Rename() function works for local files only, tried to copy file rename it and put it back to its place, but thats not the best way to do this in my opinion. So what ways you could offer for editing (renaming, deleting and so on) external files in your computer?
Edit: Rename() mentioned above is from stdio.h library : http://www.cplusplus.com/reference/clibrary/cstdio/rename/ I will be using this in sort of automatic file name randomizer
Upvotes: 1
Views: 785
Reputation: 628
The "rename" function from Boost.Filesystem /* http://www.boost.org/doc/libs/release/libs/filesystem/ */ takes path as an argument: http://www.boost.org/doc/libs/release/libs/filesystem/v3/doc/reference.html#rename
See tutorial for examples: http://www.boost.org/doc/libs/release/libs/filesystem/v3/doc/tutorial.html
Upvotes: 1