• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hello, I'm new here (now there's a classic)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hello, I'm new here (now there's a classic)


  • Subject: Re: Hello, I'm new here (now there's a classic)
  • From: Jean-Baptiste Le Stang <email@hidden>
  • Date: Fri, 17 May 2002 14:28:15 +0200

Try the following script, that's a slight modification from a Script
Debugger library. But I hope you'll have the time, it can be quit long

Jean-baptiste LE STANG

-------------------------------------------------
repeat with x in list disks
ProcessAFileOrFolder(x & ":")
end repeat

on ProcessAFileOrFolder(theFile)

--
-- This handler processes a file or a folder. If its a folder, we
recure
-- into ScanAFolder. If its a file, we call the user handler
"ProcessAFile"
-- to deal with the file
--

set theFileInfo to info for theFile
if folder of theFileInfo then

-- That's what I modify from Script Debugger Library
tell application "Finder"
open theFile
set view of theFile to name
close theFile
end tell
--

ScanAFolder(theFile)
else
ProcessAFile(theFile)
end if
end ProcessAFileOrFolder

on ScanAFolder(theFolder)

--
-- This handler scans through a folder. The ProcessAFile hander is
called for each file
-- found in the folder. Folders are handled by calling ScanFolder to
recursivly
-- work through the folder tree
--

set fileNames to list folder theFolder
repeat with aFile in fileNames
set theFile to (theFolder as string) & contents of aFile
ProcessAFileOrFolder(alias theFile)
end repeat
end ScanAFolder
-------------------------------------------------


> As said I'm new to Applescript out of a need that I'm sure Applescript
> can do.
>
> At our company we have a server volume where some folders are set to
> view by icon and some by list. I need an Applescript that sets all
> folders to list view.
>
> Now I know how to set one folder via applescript but i dont know how to
> set all folders within one disk to a set view. I take it I would use a
> wildcard of some sort but cant find any info.
>
> Please help me show Mac's are better in our company (we have 400 wintel
> machines and 80 mac's) we had 60 macs when I started, help me make it more.
>
> Gerard
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Hello, I'm new here (now there's a classic)
      • From: Jean-Baptiste Le Stang <email@hidden>
References: 
 >Hello, I'm new here (now there's a classic) (From: macster <email@hidden>)

  • Prev by Date: Re: Hello, I'm new here (now there's a classic)
  • Next by Date: Re: Need help writing some AppleScripts!!! Please help!
  • Previous by thread: Re: Hello, I'm new here (now there's a classic)
  • Next by thread: Re: Hello, I'm new here (now there's a classic)
  • Index(es):
    • Date
    • Thread