- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Rename a file in C++ on Unix platform
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 08:19 AM
тАО06-11-2008 08:19 AM
Re: Rename a file in C++ on Unix platform
> in unix and windows.
I thought that I explained how to do it, as
have others. I even explained how to avoid
the problem by writing your temporary file to
the right place, instead of to "/var/tmp".
Do you need someone to write the code for
you, or what? What's not clear yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 08:21 AM
тАО06-11-2008 08:21 AM
Re: Rename a file in C++ on Unix platform
Thanks alot........
It is working fine now.I have used Preprocessor directives for the compatiblity problem .
#ifdef UNIX
system("mv /var/tmp/xyz.pdf ./Result/abc.pdf");
#else
if(rename(tmpfn[0], filename))
{
map_msg_err("Can't rename temp-PDF file '%s' to '%s'\n", tmpfn[0], filename);
mexit(EXIT_PDFRENAME);
}
#endif
Once again thanking u all for ur valubale suggestions...:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 08:28 AM
тАО06-11-2008 08:28 AM
Re: Rename a file in C++ on Unix platform
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 08:31 AM
тАО06-11-2008 08:31 AM
Re: Rename a file in C++ on Unix platform
As a new Forum member, welcome! If you are happy with the suggestions you have received, please read:
http://forums11.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 08:35 AM
тАО06-11-2008 08:35 AM
Re: Rename a file in C++ on Unix platform
Yeah. Sometimes it'd be nice to know more
about the people who post these questions, so
you'd know what not to buy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 08:38 AM
тАО06-11-2008 08:38 AM
Re: Rename a file in C++ on Unix platform
Steven, we have the same point of view.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- « Previous
-
- 1
- 2
- Next »