• 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: Folder size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder size


  • Subject: Re: Folder size
  • From: Hanaan Rosenthal <email@hidden>
  • Date: Wed, 25 Feb 2004 13:25:12 -0500
  • Organization: Custom Flow Solutions

Hi Mike,

Here's a script I wrote not too long ago. It does somewhat what you wanted
but may have to be modified.

Hanaan

script:
------
set max_folder_size_in_mb to 1
set images_folder to "path:to:Original:"
set archive_folder to "path:to:archive:"
set subfolder_counter to 1
tell application "Finder"
repeat until (count files in folder images_folder) is 0
set folder_name to "folder " & subfolder_counter
set archive_sub_folder to make new folder in folder archive_folder with
properties {name:folder_name}
set image_list to list folder alias images_folder without invisibles
set file_list to {}
set total_MB to 0
set file_counter to 1
repeat while ((total_MB is less than max_folder_size_in_mb))
set fileName to item file_counter of image_list
set file_size to size of (info for alias (images_folder & fileName))
set file_size_in_MB to (file_size / 1024 / 1024)
set total_MB to total_MB + file_size_in_MB
set file_counter to file_counter + 1
move file fileName of folder images_folder to archive_sub_folderend repeatset
subfolder_counter to subfolder_counter + 1
end repeat
end tell
------

>
> I would like to know if I can applescript a large size folder into smaller
> folders. I would like to do this so it can accommodate the size of a
> 700mg CD. Is there a way that the folder structure can stay in tack when
> switching from new folder to new folder. Any help or direction will be
> greatly appreciated.
>
> Michael Wendelken/TSR
> Nec Inc.
> 345 7th Ave Suite 1101
> New York,NY 10001
> Phone: 646-733-9166 ext. 4009
> Fax: 646-733-9178
> email@hidden
> _______________________________________________
> 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.


  • Prev by Date: Folder size
  • Next by Date: Re: Do shell script
  • Previous by thread: Re: Folder size
  • Next by thread: Setting reply to header for outgoing mail.app message
  • Index(es):
    • Date
    • Thread