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

Re: Move File


  • Subject: Re: Move File
  • From: Gary Lists <email@hidden>
  • Date: Fri, 06 Jun 2003 12:50:39 -0400

On or about 6/6/03 12:27 PM, Ruby Madraswala wrote:

> I am having problem with simple move command. If a file exists in infolder:
>
> This does not work (will not move the file)
> Tell application "Finder"
> Move file efile to folder infolder with replacing
> End tell
>
>
> This works (will move the file)
> Tell application "Finder"
> If efile exists then
> Delete file (infolder & efile)
> End if
> Move file efile to folder infolder with replacing
> End tell
>
> Any reason Why? (OS 9.2).
>
> Thanks
> Ruby

Ruby, OS9.1.2 here, and your top offering _does_work for me. I think it is
unclear from your code what the variable 'efile' holds.

It needs an alias, and then the tell...block return a finder reference.

For example:

-- This does not work (will not move the file)
set efile to choose file
efile
-- alias "My iMac:Desktop Folder:untitled folder:b"

set infolder to choose folder
infolder
-- alias "My iMac:Desktop Folder:untitled folder:internalfolder:"

tell application "Finder" to move file efile to folder infolder with
replacing
-- file "b" of folder "internalfolder" of folder "untitled folder" of
application "Finder"


--
Gary

OMM: OS9.1.2 / osa:AS 1.8.3 / osa:JS 1.0.3
"9 is Fine"

Please reply directly to the list.
Incoming messages are auto-deleted. (It's anti-spam, that's all.)
_______________________________________________
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: Remove Menu extras
  • Next by Date: Re: Remove extra spaces from a string
  • Previous by thread: Move File
  • Next by thread: RE: Move File
  • Index(es):
    • Date
    • Thread