Connecting Tech Pros Worldwide Forums | Help | Site Map

renaming an open file using c++

mohi
Guest
 
Posts: n/a
#1: Jun 27 '08
hello every one ,
i want to open a file and then do some processing on it and finally
change its name or append something to its name and then save it
back .
can anyone please help!

and also i have to open all the files with a set of
extensions( .txt,.doc etc) files in a directory using only the
extensions as the actual name of the files is not available ..can that
be done ????

thank you
mohan

Juha Nieminen
Guest
 
Posts: n/a
#2: Jun 27 '08

re: renaming an open file using c++


mohi wrote:
Quote:
hello every one ,
i want to open a file and then do some processing on it and finally
change its name or append something to its name and then save it
back .
can anyone please help!
>
and also i have to open all the files with a set of
extensions( .txt,.doc etc) files in a directory using only the
extensions as the actual name of the files is not available ..can that
be done ????
Not with standard C++ libraries. Most compilers provide
system-specific libraries to do those things. You didn't mention your
system so I can't be of more help.
utab
Guest
 
Posts: n/a
#3: Jun 27 '08

re: renaming an open file using c++


On Tue, 22 Apr 2008 02:36:08 -0700, mohi wrote:
Quote:
hello every one ,
i want to open a file and then do some processing on it and finally
change its name or append something to its name and then save it
back .
can anyone please help!
>
and also i have to open all the files with a set of
extensions( .txt,.doc etc) files in a directory using only the
extensions as the actual name of the files is not available ..can that
be done ????
>
thank you
mohan
I did reply you, in case you missed that, did you have a look at the boost
filesystem library, for linux it is perfect and you can do most of what
you have written. copying with a new name, rename , removing etc.

Rgds,

--
Umut
utab
Guest
 
Posts: n/a
#4: Jun 27 '08

re: renaming an open file using c++


On Tue, 22 Apr 2008 02:36:08 -0700, mohi wrote:
Quote:
hello every one ,
i want to open a file and then do some processing on it and finally
change its name or append something to its name and then save it
back .
can anyone please help!
>
and also i have to open all the files with a set of
extensions( .txt,.doc etc) files in a directory using only the
extensions as the actual name of the files is not available ..can that
be done ????
>
thank you
mohan
Here are some links, see the 2nd

http://www.boost.org/doc/libs/1_35_0.../doc/index.htm

http://beans.seartipy.com/2006/05/10...he-filesystem/

HTH
--
Umut
Closed Thread