Toggling Visibility of Many Files

Discussion in 'Mac Apps and Mac App Store' started by tyrannitar, Apr 21, 2011.

  1. tyrannitar macrumors newbie

    Joined:
    Apr 21, 2011
    #1
    Hello everybody,

    Is there an application I can acquire to toggle the visibility of many files at once? I would prefer something equivalent to checking a box yes/no as in Windows. I've tried a couple of applications, but they either slow down when I try to do the number of files I need, or they can only change them one at a time. Thanks!
     
  2. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
  3. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #3
    This will hide the files you drag onto it:

    Code:
    on open fileList
    	
    	set tid to AppleScript's text item delimiters
    	set AppleScript's text item delimiters to "/"
    	repeat with fn in fileList
    		set psxFn to quoted form of POSIX path of fn
    		set hideThisFile to ((text items 1 thru -2 of psxFn) as text) & "/." & last text item of psxFn
    		do shell script "mv " & psxFn & " " & hideThisFile
    	end repeat
    	set AppleScript's text item delimiters to tid
    end open
    Copy/Paste into an AppleScript Editor window, and save as an application.

    This will convert all the invisible files in a folder to visible, leaving out ".DS_Store" and ".localized" files:

    Code:
    set theFolder to choose folder
    
    set thePsxFolder to POSIX path of theFolder
    
    set allTheFiles to (do shell script "ls -A " & (quoted form of thePsxFolder))
    
    set numFiles to number of paragraphs of allTheFiles
    
    repeat with x from 1 to numFiles
    	set fileName to paragraph x of allTheFiles
    	
    	if character 1 of fileName is "." then
    		
    		if (fileName is not ".DS_Store") and (fileName is not ".localized") then
    			set charArray to characters of fileName
    			set newFileName to thePsxFolder & (characters 2 thru -1 of fileName) as text
    			
    			set oldFileName to thePsxFolder & fileName
    			
    			do shell script "mv " & (quoted form of oldFileName) & " " & (quoted form of newFileName)
    			
    		end if
    	end if
    end repeat
    
    This can be saved as a script or app or whatever.

    mt
     

Share This Page