Solved

Copying an open file dangerous?

Posted on 2000-02-25
1
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 200 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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