hi all, im trying to find out how i can move a file to another location in c++. Is there any kind of function or way i could do this. Ive seen before someone using the system() function to use command prompt style commands like system("cmd,command"); or something like that im not sure whether that is right or not, but i get errors when i try to do it using the dev-c++ compiler. Can someone please help ?

13 Years
Discussion Span
Last Post by bops

since you are using dev-c++ compiler I assume you are programming on some version of MS-Windows operating system. See win32 api function MoveFile() or MoveFileEx(), which will move a file or an entire directory.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.