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

Re: DS Store


  • Subject: Re: DS Store
  • From: Deivy Petrescu <email@hidden>
  • Date: Thu, 13 Aug 2009 18:54:54 -0400


On Aug 13, 2009, at 1:44 PM, Steve Digby wrote:

Hi Michelle,

This final version as amended by Lee Laine works.

Thank you for your input on this, which was not far away from the final version and pointed us in the right direction.

Kind regards,

Steve.




Try this version. Be sure that the path text is precise.

set originalFolderPath to "Central Storage:Shipping:EDI FILES:tmp:inv tmp:"
set newfolderpath to "Central Storage:Shipping:EDI FILES:Freeway:invoice:"


tell application "System Events"
set fileList to every file in folder originalFolderPath whose visible is true
end tell


tell application "Finder"
repeat with i from 1 to count fileList
set thisFilePath to ((item i of fileList) as alias)
if name of thisFilePath ends with "inv.txt" then
duplicate thisFilePath to (newfolderpath as alias) with replacing
end if
end repeat
end tell




On Aug 13, 2009, at 8:39 AM, Steve Digby wrote:

Both the scripts below give the same error message:

I don't know then.

Sorry.

-- Michelle


--
"As a matter of general principle, I believe there can be no doubt that criticism in time of war is essential to the maintenance of any kind of democratic government ... too many people desire to suppress criticism simply because they think that it will give some comfort to the enemy to know that there is such criticism." -- Robert A. Taft, December 19, 1941





_______________________________________________
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

Lasgo Chrysalis Limited. Registered in England & Wales No. 1380166.
Part of the Chrysalis Plc.
Registered office: The Chrysalis Building, Bramley Road, London W10 6SP


_______________________________________________



Steve, I believe you can do all your stuff in a 1 liner (3 for readability...)


set originalFolderPath to "Central Storage:Shipping:EDI FILES:tmp:inv tmp:"
set newfolderpath to "Central Storage:Shipping:EDI FILES:Freeway:invoice:"


tell application "Finder" to move (every file in folder originalFolderPath whose name ends with "inv.txt") to folder newFolderPath with replacing

I am positive this will not copy DS.store files.



Deivy Petrescu
email@hidden



_______________________________________________
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: 
 >Re: DS Store (From: Steve Digby <email@hidden>)

  • Prev by Date: Re: Running from script menu - the invisibility
  • Next by Date: Re: Using \U \L in regular expressions
  • Previous by thread: Re: DS Store
  • Next by thread: Re: DS Store
  • Index(es):
    • Date
    • Thread