Why does Mac OS X sometimes complain that a copy failed because a file is in use?

13

1

Recently I've been copying files from DVDs to network storage on my Mac running Leopard 10.5.7.

I'm just dragging and dropping in Finder to perform the copy.

Occasionally the copy will fail with a dialog complaining that a file is in use. If I repeat the copy generally it completes successfully.

I could understand this being a problem if one was trying to move a file and it was open by another app. But none of these files are open in other apps. I just pop the DVD in, drag and drop the files to my NAS's network share and sometimes it fails with the "file in use" error.

This is very annoying. Anyone have any ideas?

orj

Posted 2009-07-20T14:14:02.230

Reputation: 303

Answers

7

The problem is Quick Look. As soon as you open a folder in the Finder it tries to create previews.

I'm running 10.5.7 and still get this problem all the time transferring video files from external drives. Only solution seems to be to open the folder, wait for the preview icons to appear and then try to copy the files.

A possible solution is to disable "Show icon preview" in the Finder view options. That only occurred to me, so I haven't tested it though.

Alistair McMillan

Posted 2009-07-20T14:14:02.230

Reputation: 292

Sorry, "Note that you have to manually kill the quicklookd process." was added to my original answer.I don't understand why. Open the folder, wait for the previews to be generated and then copy the files. Alternatively turn off icon preview. Why would you kill the quicklookd process? – Alistair McMillan – 2014-03-12T14:10:47.350

3

Show icon preview is the problem! Put it on list view and there are no problems. It's a bug!

Tommy

Posted 2009-07-20T14:14:02.230

Reputation: 31

2

The only way I can do it is to use the Terminal Application and either use mv to move then or cp to copy the required files to the network or external drive.

Tom Knights

Posted 2009-07-20T14:14:02.230

Reputation: 21

This answer does not say why this happens. – Kevin Panko – 2014-02-05T21:31:36.927

1

The utility What's Keeping Me? for OSX may help you find out what's keeping it from working. Basically, it lets you find out what process has a file open.

Have you ever have the problem where you can’t empty the Trash or eject a disk because something is preventing you? Usually the reason is because some application has a file open, and thus you can’t get rid of the disk or trash the file. That’s why we made What’s Keeping Me! What’s Keeping Me will identify the application that is holding the item open. You can then use What's Keeping Me to quit the problem application (or kill it if needed) so you can perform your task. What’s Keeping Me includes an Automator workflow so you can perform searches directly from the Finder too!

Chris W. Rea

Posted 2009-07-20T14:14:02.230

Reputation: 10 282

0

One possibility is an antivirus program, if you have one (yes, I know you're on a mac). It might be checking the file while you are in the middle of copying it. I use Symantec, and because I never put anything other than my own stuff in the drive, I have disabled scanning on that device.

Zac Thompson

Posted 2009-07-20T14:14:02.230

Reputation: 887

0

My first thought would be that Spotlight might be trying to index the drive and is accessing the file when you are trying to copy it. This may be wrong and I'll look into the issue more but my first thought is Spotlight.

bjtitus

Posted 2009-07-20T14:14:02.230

Reputation: 195

3That's wrong; spotlight opens files in a mode that don't count to the "in use" flag (specifically, it opens them O_EVTONLY). – None – 2009-07-30T06:54:42.040

0

I've had QuickLook cause an error similar to this when it was rendering previews - as far as I could tell it was just bad timing but have not seen this "bug" since 10.5.3. Is QuickLook creating previews when you are copying the files?

Chealion

Posted 2009-07-20T14:14:02.230

Reputation: 22 932