Being concerned here only with visibility, I can “change the visibilty” of a desktop icon by moving to a folder and back with a script. This makes it look like its appearing and disappearing on the desktop.
:arrow: Is there a way to truely change the “visibility” property of a desktop icon so that its there, you just don’t see it until you change it back to visible?
I tried a simple “set visible of the_Icon to false” but no go. Also, can this be done natively on the system with no OSAX additions?
Hi sitcom,
It’s my contention that you wanting to make a file disapear from the GUI, without actually deleting it. If so then what your wanting to do is make the file Hidden.
This can be done using a shell script either from the Terminal Cmnd Ln or via the: -
“do shell script” from within Applescript: -
mv ~/fileName .fileName
This shell Cmnd simply changes the name of the specified file in your Home Dir to include a dot prefix. Thus, “~/” is short for Home Dir.
Furthermore, any file with this prefix should be rendered Hidden. Although, it’s poss to insert a dot prefix using native AS code, for some reason it doesn’t render the Target File invisible.
Warning: Since white space in shell scripts are used to separate a Cmnd from its Params & Params from each other, it’s not Poss to just casually use white space in file &/or folder names. However, if it’s necessary for your file or folder names to include spaces, then all white space must be escaped using the “” Char.
Example: If the Target File is called file Name, then it would have to be rewritten in the Terminal as: file Name - Note that the white space is still included.
----Making Your Hidden Files Visible Again:----
mv ~/.fileName fileName
----List Hidden Files----
The follolwing Cmnd allows you to view all Hidden files in your Home Dir: -