AW: Reading Folder Names
AW: Reading Folder Names
- Subject: AW: Reading Folder Names
- From: Samuel Nitsche <email@hidden>
- Date: Wed, 2 Oct 2002 15:48:32 +0200
So you could count all the Text-Items and get only the last. Then you have
the whol Path AND the Name of the Folder.
With this method you should be able to get every Name, which ever you want!
Greetz Pesse
P.S. Maybe you must do a bit trying and playing with the possibilities
-----Urspr|ngliche Nachricht-----
Von: email@hidden [
mailto:email@hidden]
Gesendet: Mittwoch, 2. Oktober 2002 14:37
An: Samuel Nitsche
Betreff: RE: Reading Folder Names
Thats the problem I've been running into. This script will be run on a
file transfer system and the folders will be dropped and will not be a
fixed folder, it could have any name with any number of characters.
Samuel Nitsche
<email@hidden> To:
"AppleScript Mailing List (E-Mail)"
Sent by:
<email@hidden>
applescript-users-admin@lists cc:
.apple.com Subject: RE:
Reading Folder Names
10/02/02 03:45 AM
Hi
Please tell me WHICH Folder name you want to get.
There are some ways to get the folder name.
For example, there is a nice way (I think the best and most flexible) with
the appleScript Item-Delimiters:
set theSourceFolder to choose folder --This is the complete Path to the
folder
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set theFolder to text item 2 of theSourceFolder --Now you can get every
Folder of the Path (Because Folders are divided with :) and you can easily
get the Name of the Folder you want by getting text Item 2, 3 etc. You can
also count the text items and get the last in this way. You'll need some
trying to get the right result, but remember: Apple Scripting is trying and
get experience!!
set AppleScript's text item delimiters to oldDelims --Set the delimiters
back to the original
I hope I could help you a bit. I think you should get all information you
need.
>
----------
>
Von: email@hidden
>
Gesendet: Dienstag, 1. Oktober 2002 20:43 Uhr
>
An: Samuel Nitsche
>
Betreff: RE: Reading Folder Names
>
>
>
Here is what i have so far:
>
on adding folder items to this_folder after receiving added_items
>
set Fname to (name of added_items)
>
if Fname is equal to "NYC" then
>
tell application "Finder" to duplicate added_items to folder
>
"IB_NewYork" of folder "User Mailboxes" of folder "MassTransit 4.0
Folder"
>
of folder "Applications (Mac OS 9)" of startup disk with replacing
>
tell application "Finder" to delete every item of this_folder
>
>
else
>
tell application "Finder" to duplicate added_items to folder
"To
>
Cin" of desktop with replacing
>
tell application "Finder" to delete every item of this_folder
>
end if
>
end adding folder items to
>
>
>
>
>
Samuel Nitsche
>
>
<email@hidden> To:
>
>
Sent by:
>
"'email@hidden'"
>
applescript-users-admin@lists
>
<email@hidden>
>
.apple.com cc:
>
>
Subject: RE:
>
Reading Folder Names
>
>
>
10/01/02 01:00 PM
>
>
>
>
>
>
>
>
>
>
Hi
>
>
>
>
Could you please post your Script or describe a bit better that I can
help
>
you?
>
>
I have some Ideas to help you - I've once had the same problems. But I
>
should have more Information about the Script.
>
>
>
>
Greetz Pesse
>
>
>
>
P.S. I will be back in about 12 hours - have to go now.....
>
_______________________________________________
>
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.
_______________________________________________
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.