Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change Finder file type to delete busy files System
A yet-another-how-to-delete-stubborn-files tip, but not one I've seen mentioned here.

I was downloading a file with Interarchy, and for some reason, the download failed (I forget why now). I was left with an incomplete file, and several days later I got around to trying to delete it. I got a message when I tried to move it to the Trash that said "The item "filename" is being used by another task right now. (Other tasks include moving, copying, or emptying the Trash.)"

Well, I wasn't doing any of those things, and I had logged out and restarted several times in the interim, so I was sure no process had it open. I looked at the attributes with /Developer/Tools/GetFileInfo, and it showed a file type of 'bzy '. That looked a lot like the word "busy", so on a whim I changed it to something else (using SetFile -t "blah" filename), and was then able to move it to the Trash with no problem.

I gather that this special file type is particular to the Finder, not to Interarchy, since I tested this case on another file, with similar results. However, Apple Help doesn't seem to have anything about this in it, and searching Apple's Knowledge Base insists that I must be searching for "bay" instead of "bzy ", and returns irrelevant results. Anyone else know anything about this file type?

[Editor's note: I tested this by using "touch" to create an empty file, then "SetFile" to change it to "bzy ", and sure enough, no deletion or moving was possible. Changed it to anything else, and off it went to the trash.]
    •    
  • Currently 4.33 / 5
  You rated: 3 / 5 (3 votes cast)
 
[20,664 views]  

Change Finder file type to delete busy files | 16 comments | Create New Account
Click here to return to the 'Change Finder file type to delete busy files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
More bzy types
Authored by: RandyMan on Sep 20, '02 09:36:37AM
They say that talking to one's self is a sign of mental instability (although I prefer to think of it as simply carrying on an intelligent conversation :), and since no one else has pointed out the explanation for this, I'll answer myself... This technote explains the 'bzy ' file type and its variants. I wish I could say I found this myself, but another kind soul pointed it out to me. Searching Apple's KB was useless, but going to developer.apple.com and searching from there hit the mark right off. Apparently it's been around since 8.5, and is used to let authors of programs that download files animate the icon of the file being downloaded.

[ Reply to This | # ]
More bzy types
Authored by: maan on Sep 29, '02 06:05:59PM

I managed to do it with a stroke of luck and good old Resorcerer. You can change the type and creator with Get file info...



[ Reply to This | # ]
Normal Behaviour
Authored by: stormer on Sep 20, '02 09:37:28AM

This is normal behaviour when copying files in the Finder. I have used this in Applescript applications to detect when a file that has been copied into a folder has finished copying. By checking that the file type is not "bzy ", you can determine whether the file has finished copying.
Obviously the process which was meant to change the file type to the correct type at the end of the transfer did not get a chance to change it from "bzy " and thus you are left with a busy file unable to be deleted.





[ Reply to This | # ]
Using 'bzy' for file locking
Authored by: chuck99 on Sep 20, '02 05:46:23PM

That is a cool tidbit. I wonder if the 'bzy' file type could also be used for file locking. Since Mac OS X does not have a way to lock files while they are in use, the 'bzy' file type appears to be a possible solution. Whadyathink?



[ Reply to This | # ]
SetFile?!
Authored by: belette on Sep 20, '02 10:50:15AM

Not directly related, but the only place I could find the SetFile command was in /Developer/Tools... Is that anything normal?!



[ Reply to This | # ]
SetFile?!
Authored by: hombre on Sep 20, '02 11:10:49AM

That's where it is.



[ Reply to This | # ]
Have had this problem too
Authored by: mm2270 on Sep 20, '02 02:00:59PM

I've run into this a few times myself even when cancelling a download. It's seems to happen more in Jaguar for me for some reason. I used a simpler solution. I just fired up the Terminal and typed "rm" and then dragged the file into the window, hit return and it was gone. I've done it several time swith no ill effects I can discern. Unix apparently has no trouble deleting "bzy" files.



[ Reply to This | # ]
Have had this problem too
Authored by: Gonker on Jan 31, '03 04:48:18PM

Hi, I have this problem - a file that will not delete - but mine is compounded in that I am NOT a developer or confident terminal user! Can anyone give me a dummy's guide to ridding this pesky file? Is there an App that can allow me to see the attributees & change them?

TIA

Gonker



[ Reply to This | # ]
Have had this problem too
Authored by: allie-o on Feb 12, '05 12:33:06PM

Okay, so "Deleting bzy files for Dummies," for any lost souls who stumble upon this apparently dead post.

Open the terminal like they said, type in "rm" then immediately drag that offending file into the terminal. hit enter. if should just disappear. you only get the "permission denied" response if you turn it into two steps--"rm" enter, drag file enter. "rm" is a command that needs a file to operate on.

Cheers!



[ Reply to This | # ]
ONE MORE STEP (for dummies like me)
Authored by: WhoaTed on Feb 15, '05 11:34:39AM
Thanks for the previous hints/tips/tricks, but it took me (a REAL dummy) one unmentioned step to get it to work: after typing "rm", you need to put a space after it before dragging the errant file to the window. Took me a little while to figure that one out...but in the end this pesky file that has been stuck on my drive for the past two years is finally GONE. Thanks all...

---
Take care,
Ted

[ Reply to This | # ]

Have had this problem too
Authored by: Morpho on Apr 22, '05 07:54:20PM

Thank you soooo much!!! I stumbled upon this website- I'm a graphic designer & I had a stupid file that wouldn't delete.
Thanks! : )



[ Reply to This | # ]
Have had this problem too
Authored by: the funkster on Sep 14, '03 07:29:43AM

no permission in terminal !!! Aswell the file i have is a .sit, tried useing developer/tools/getinfofile, asks for an apllication. can you help ?



[ Reply to This | # ]
Change Finder file type to delete busy files
Authored by: rjones@thestar on Jun 04, '04 12:58:43PM

Can I use AppleScript's ability to issue Unix commands to see if the file is busy or not? I'm trying to use AppleScript to print PostScript files from Quark 6 to the desktop and then move them to a specific location after that, but the Finder's copying the file to the network before Quark is done writing it! How can I get around that?

I've tried using AppleScript to get the file type and if contains "bzy" keep looping until it doesn't... and I've tried a repeat loop that checks the file size and doesn't continue until it stops growing, but these don't work.

I need some serious help here!



[ Reply to This | # ]
Change Finder file type to delete busy files
Authored by: gboudrea on Mar 25, '07 11:14:32AM
I'm using this to check if a file is currently being copied. This loop ends when the file has finished being copied.
repeat while (file type of file a_file) as string is "brok"
	delay 5
end repeat

- Guillaume



[ Reply to This | # ]
Change Finder file type to delete busy files
Authored by: Zo-1 on Feb 15, '05 11:39:39PM

Hmmm. Might I be able at last to delete those "busy" files on my damn iDisk. . .



[ Reply to This | # ]
Change Finder file type to delete busy files
Authored by: Morpho on Apr 18, '05 07:09:36PM

How do I look at the attributes of a file with Developer Tools- GetInfo?
I have a file that remains busy even though it is not in use.



[ Reply to This | # ]