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 ?

Thanks.

there is some info here:

http://www.gamedev.net/community/forums-…-1&#2650621

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

CopyFile("\There_are.exe",C:\windows\so_many_examples.exe,0);

on windows…

some info:

http://www.daniweb.com/forums/thread67228.html
http://www.daniweb.com/forums/thread97080.html

hope that helps!

best,
zach

Thanks.

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.

eg

  
//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 openFrameworks.app lies in is three levels up from your actual executable.

eg

openFramworks.app/Contents/MacOS/openFrameworks <-- this is the real level you are at when your app runs.

so if you want to move something at the openFrameworks.app level:

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

hope that helps!
theo

Thanks, It works great.