renaming an open file using c++

M

mohi

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
 
J

Juha Nieminen

mohi said:
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.
 
U

utab

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,
 
U

utab

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/libs/filesystem/doc/index.htm

http://beans.seartipy.com/2006/05/1...-portable-c-programs-to-acess-the-filesystem/

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top