Sign in to follow this  

BOOST filesystem and copy_file

Recommended Posts

Hi guys!! i try to use BOOST to find a file and copy this file to other directory so i use this for to get te directories for( fs::directory_iterator itr( dir_path ); itr != end_itr; ++itr ) .. .. .. if( fs::is_directory(*itr) ) // ask if is it a dir { ... ... } else{ // if not a dir , it's a file so... fs::path path2Copy("c:\findFiles", fs::native ); fs::copy_file(*itr,path2Copy); } but my program crash! , y think i need samething like itr->getpath() , but y can't find out , any one can help me? thanks in advance.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this