Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 12th, 2005, 11:38 PM   #1
shaokhan
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 shaokhan is on a distinguished road
need help????

So I have made a little program in C++, that modify a file and I want after 10 days to be able to restore the file from his original format, how can I do that?
shaokhan is offline   Reply With Quote
Old Apr 12th, 2005, 11:44 PM   #2
codetaino
Programmer
 
codetaino's Avatar
 
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4 codetaino is on a distinguished road
you have a file... lets see with a configuration? you made changes... and after 10 days you want to be able to restore the file to its original configuration? (this is an example, i dunno the info in your file)

If this is the case.. why dont you just maintain a copy of the original file.. and in ten days... just do whatever you like with the edited one... delete it.. rename it. move it... and copy the backup of the original as the name of the one you can edit

-codetaino
__________________
"God bless u all" :)
codetaino is offline   Reply With Quote
Old Apr 13th, 2005, 11:44 PM   #3
shaokhan
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 shaokhan is on a distinguished road
Yes but how to do that, I have thinck about rename it .bak but how to make the program rename it?
shaokhan is offline   Reply With Quote
Old Apr 15th, 2005, 4:15 AM   #4
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
http://www.amazon.com/exec/obidos/tg...books&n=507846
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Apr 18th, 2005, 11:59 PM   #5
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
use a scheduled task (windows) or a cronjob (unix) to copy in the original file (saved in another location) to the production location.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:36 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC