Connecting Tech Pros Worldwide Help | Site Map

renaming an open file using c++

  #1  
Old June 27th, 2008, 05:38 PM
mohi
Guest
 
Posts: n/a
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
  #2  
Old June 27th, 2008, 05:38 PM
Juha Nieminen
Guest
 
Posts: n/a

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.
  #3  
Old June 27th, 2008, 05:38 PM
utab
Guest
 
Posts: n/a

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
  #4  
Old June 27th, 2008, 05:38 PM
utab
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compessing an Access database John Baker answers 12 March 16th, 2006 01:45 AM
How to modify a file using C++ file objects Venkat answers 12 July 22nd, 2005 06:02 AM
Efficient grep using Python? sf answers 13 July 18th, 2005 07:59 PM
Efficient grep using Python? Jane Austine answers 0 July 18th, 2005 07:49 PM