|
|
|
|
This code backs up anyfile with just one simple line of code! It is easy and can be used with all applications. Check this out!!
|
| |
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
@ARGV="http://www.coolplace.com/cool.log";
$^I=".bk";
################DO NOT COPY PAST THIS LINE###########
Ok, now let me explain the above code.
First, we set @ARGV = to the file location so that perl knows where the file is that is needs to back up. The next line of code, "$^I" basically means 'backup'. We set $^I = to the file extension we want to use on the back up file. So if the file's name is cool.log, after we run the "backup code" it will create another file with the name cool.log.bk with all the same stuff cool.log had in it. Simple as that!! ;-)
|
|
Report Bad Submission
|
Your Vote
|
| |
Other User Comments
|
6/5/2002 5:08:44 PM: John Winger
This didn't work for me and I don't see how it can work. Where do you do the actual copy and renaming? Does this maybe only work on Unix/Linux? (If this comment was disrespectful, please report it.)
|
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|