Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Copying an open file dangerous?

Posted on 2000-02-25
1
Medium Priority
?
263 Views
Last Modified: 2010-04-14
I have an AppleScript that executes nightly and does a Finder copy my Microsoft Outlook data files to another computer to back up my email.

Outlook checks for mail every 10 minutes (as I have it set up). So, it is possible that the contents of the data file may change while the Finder copy is going on.

Does that mean that the copies file may end up in an inconsistent state? Or does the file system make sure that when the Finder is copying a file, updates will be ignored by the process doing the copy, i.e. the file looks as it did at the beginning of the copy operation?
0
Comment
Question by:garyrob
1 Comment
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 600 total points
ID: 2560456
Yup, sure does, and here's how to prove it to yourself:

1. Start downloading a big file with your browser or ftp client.
2. Wait a couple seconds.
3. Copy the partially-downloaded file in the Finder.
4. Wait for the download to finish.
5. Note that the copy is slightly bigger than the original when you started, but not the full file.

Moral: If a file is altered while the Finder is copying, the copy's integrity is questionable at the very best.

Perhaps if you send the AppleScript "connect to" command before you copy, the timer resets so you have 10 minutes to copy once it returns? Or you could always just quit and restart it from your script, too.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question