954,176 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

move() function ?

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 ?

bops
Posting Whiz in Training
214 posts since Aug 2005
Reputation Points: 23
Solved Threads: 5
 
Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

aaa right, thanks a lot :cheesy:

bops
Posting Whiz in Training
214 posts since Aug 2005
Reputation Points: 23
Solved Threads: 5
 

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.

Ancient Dragon
Retired & Loving It
Team Colleague
30,046 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,342
 

yea i am, windows xp, thanks for the tip

bops
Posting Whiz in Training
214 posts since Aug 2005
Reputation Points: 23
Solved Threads: 5
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You