moving files to another folder from within an of program

Hi, Is there a way I can easily move files from one folder to another from within an of program ?


there is some info here:…-1&#2650621

you can do it in c/c++, but also using system commands and system api commands… such as,


on windows…

some info:

hope that helps!



I’m running on Mac OSX, but I’ll go after your tips.

Thansk again.

the forum doesn’t let me write this command - so I had to put spaces between the letters - remove the spaces :smiley:

then the s y s t e m(" "); command might be what you need.
it lets you execute a command line command.


//make a folder on your desktop  
s y s t e m("mkdir ~/Desktop/poo");  

//copy a file in your current directory   
s y s t e m("cp someFile someOtherFile");  

be careful what you do though!
and remember that the folder that the lies in is three levels up from your actual executable.

eg <-- this is the real level you are at when your app runs.

so if you want to move something at the level:

//copy a file 3 levels up from your current directory  
s y s t e m("cp ../../../someFile ../../../someOtherFile");  

hope that helps!

Thanks, It works great.