• 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: "Ruby Madraswala" <email@hidden>
  • Date: Fri, 6 Jun 2003 14:32:08 -0400
  • Thread-topic: Move File

Hi Gary
Thanks for the reply

I have the following
Property infolder: "ruby-hd:final:"
Property wkfolder: "ruby-hd:in-work:"
..........
.............

Set efile to wkfolder & "filename"
Tell application "Finder"
Move file efile to folder infolder with replacing
End tell

Ruby

-----Original Message-----
From: Gary Lists [mailto:email@hidden]
Sent: Friday, June 06, 2003 12:51 PM
To: AppleScript Users
Subject: Re: Move File

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.



-----Original Message-----
From: Gary Lists [mailto:email@hidden]
Sent: Friday, June 06, 2003 12:51 PM
To: AppleScript Users
Subject: Re: Move File

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.
_______________________________________________
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: Re: If exists logic
  • Next by Date: Re: Do Perl Script?
  • Previous by thread: Re: Move File
  • Next by thread: Remove extra spaces from a string
  • Index(es):
    • Date
    • Thread