invisible files

seems simple and maybe it is but I can’t figure out how to set up a simple script to select and delete an invisible file that one piece of nasty software keeps putting on my machine. the file name is the same every time.
any suggestions greatly appreciated

In the “Scripting Additions” sections of this site, you can found the “File visibility” Osax. With this SA you can make visible the file to delete it.
Logically, if a file is invisible, Finder can’t see it thus it can’t delete it. :slight_smile:

Hi Roberto,
I tried that but I got the
“can’t make some data into the expected type”
response no matter what file I try to make visible or invisible
Don’t know if it matters but I am using OS 9

I haven’t tried this, but my guess is that the finder wants an alias type and you’ve provided text.

make file visible "Macintosh HD:Phantom Folder:TheFile.txt"


make file visible ("Macintosh HD:Phantom Folder:TheFile.txt" as alias)

Hey thanks,
always impressive to find a board that works so fast. I am very new at the scripting game and am trying to feel my way through the present task. I have added the SA to the scripting additions folder and have tried to use it, but every file I try it on I get an “access not allowed” message. any ideas? do I need to give the user name and password for the disk in the script?
thanks again

Hi Chris,
you may be trying to make the file visible within a Finder tell block. Don’t use the Finder or any application to do this. Simply write the command out of any tell statement:

make file visible "Macintosh HD:Phantom Folder:TheFile.txt"