Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mac > Applescript
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Applescript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old July 3rd, 2009, 02:51 PM
Registered User
Join Date: May 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Applescript: Search for folders and setting path to folder

Hi All,

I am working on a script to allow the user to pick a folder. Once picked, I wanted a search of the subfolders to see if a folder exists. In my case it will be named "Proxy".

Once I have found this folder, I would like to basically "Set Proxyfolder to path to "Proxy" folder. This way, I can perform an action to this particular folder.

Also, in many cases there may be more than one subfolder by the same name of "Proxy." How would I know which folder I would be dealing with? So far, my code is like this:

property new_foldername : "PROXY"
set this_folder to (choose folder with prompt "Select the main shoot folder")

tell application "Finder"

if (exists folder new_foldername of entire contents of this_folder) then
set Proxypath to (POSIX path of new_foldername)

display dialog "Proxy folder is not found"
end if
end tell
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Class library folder path arunkhushi C# 1 February 4th, 2008 11:59 AM
grep-search for text within files, within folders crmpicco Linux 2 September 1st, 2007 10:23 AM
Extracting the full path of a folder vamshikrishnaD ASP.NET 1.0 and 1.1 Professional 3 August 2nd, 2007 09:16 PM
Accessing folders with absolute path having chars ravishakya Pro Java 0 September 18th, 2006 01:51 AM
How do I search TEXT in web folders and pages aatayyab PHP How-To 7 January 15th, 2006 12:08 PM

All times are GMT -4. The time now is 01:32 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.