• 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: Get only the name of the file, instead of the whole path!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get only the name of the file, instead of the whole path!


  • Subject: Re: Get only the name of the file, instead of the whole path!
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 16 Jan 2008 20:50:17 +0100


Le 16 janv. 2008 à 19:12, Marcus Rodrigues a écrit :

on adding folder items to this_folder after receiving added_items
set file_name to every item of added_items as alias
--set arquivos to the items of added_itens
--set file_nome to the name of arquivos
set AppleScript's text item delimiters to ":"
--set lista to every item of added_items
--set file_nome to the last text item of lista
set texto to last text item of added_items as text

tell application "Cyberduck"
launch
set theBrowser to (make new browser)
tell (theBrowser)
set encoding to "UTF-8"
connect to "ftp.dkwdesign.com.br" with protocol "ftp" as user "dkwdesignftp" with initial folder "/httpdocs/FTP/"
upload item file_name

end tell
end tell
tell application "Mail"

launch
set newMessage to make new outgoing message with properties {subject:"Link para arquivo " & texto, content:"Link para arquivo:" & return & return & "http://www.dkwdesign.com.br/"; & texto, visible:true}
end tell
end adding folder items to


I assumes that this one may do the trick:


on adding folder items to this_folder after receiving added_items tell application "Finder" set names to {} repeat with f in added_items copy name of (f as alias) to end of names end repeat end tell (* names is the list of the NAMES of the added_items play with it as you want*) (* set file_name to every item of added_items as alias --set arquivos to the items of added_itens --set file_nome to the name of arquivos set AppleScript's text item delimiters to ":" --set lista to every item of added_items --set file_nome to the last text item of lista set texto to last text item of added_items as text *)

tell application "Cyberduck"
launch
set theBrowser to (make new browser)
tell (theBrowser)
set encoding to "UTF-8"
connect to "ftp.dkwdesign.com.br" with protocol "ftp" as user "dkwdesignftp" with initial folder "/httpdocs/FTP/"
upload item file_name
end tell
end tell
tell application "Mail"
launch
set newMessage to make new outgoing message with properties {subject:"Link para arquivo " & texto, content:"Link para arquivo:" & return & return & "http://www.dkwdesign.com.br/"; & texto, visible:true}
end tell
end adding folder items to


Yvan KOENIG _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Get only the name of the file, instead of the whole path! (From: Marcus Rodrigues <email@hidden>)

  • Prev by Date: Re: Folder Action not working
  • Next by Date: Re: Get only the name of the file, instead of the whole path!
  • Previous by thread: Get only the name of the file, instead of the whole path!
  • Next by thread: Re: Get only the name of the file, instead of the whole path!
  • Index(es):
    • Date
    • Thread