• 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 - why does it not work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move file - why does it not work?


  • Subject: Re: move file - why does it not work?
  • From: "Joseph Pollone" <email@hidden>
  • Date: Sat, 4 Mar 2006 17:02:40 -0500

Correct me if I'm wrong guys, but I'm thinking you to set the property to a string.  Note the donefolder as string in calling your moveIt subroutine.


property thefolder : "Macintosh HD:Users:jpollone:Desktop:test1:"
property donefolder : "Macintosh HD:Users:jpollone:Desktop:test2:"

set theFile to (thefolder & "aaa.html ") as string
moveIt(theFile, donefolder as string)

on moveIt(afile, newfolder)
    tell application "Finder"
        move file (afile) to folder newfolder
    end tell
end moveIt



On 3/4/06, John Fowler <email@hidden> wrote:
Dear scripters and gurus,

I can't figure out why my handler doesn't work consistently.  My
intention is to move a file from one folder to another.  With the
second formulation I get a finder error, finder "can't get" file so
and so.  I have tested to make sure there is no misspelling.  I
believe the handlers are identical.  What am I missing?

And no, I haven't been working on this particular issue since July.

John Fowler

this works:
set myfile to "Macintosh
HD:Users:johnfowler:Desktop:alternateproject:candidatefiles:LaterData200
50711173536.html"
set myfolder to "Macintosh
HD:Users:johnfowler:Desktop:alternateproject:donefolder:"
moveIt(myfile, myfolder)
on moveIt(afile, newfolder)
        --log "moveIt parms:  " & afile & " | " & newfolder
        tell application "Finder"
                move file (afile) to folder newfolder
        end tell
end moveIt

this doesn't:
property thefolder : "Macintosh
HD:Users:johnfowler:Desktop:alternateproject:candidatefiles:"
property newfolder : "Macintosh
HD:Users:johnfowler:Desktop:alternateproject:targetfile:"
property sourcefolder : "Macintosh
HD:Users:johnfowler:Desktop:alternateproject:importtargets:"
property donefolder : "Macintosh
HD:Users:johnfowler:Desktop:alternateproject:donefiles:"

set theFile to (thefolder & "LaterData20050711173536.html") as string
moveIt(theFile, donefolder)

on moveIt(afile, newfolder)
        --log "moveIt parms:  " & afile & " | " & newfolder
        tell application "Finder"
                move file (afile) to folder newfolder
        end tell
end moveIt

_______________________________________________
Do not post admin requests to the list. They will be ignored.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: move file - why does it not work?
      • From: "Joseph Pollone" <email@hidden>
References: 
 >move file - why does it not work? (From: John Fowler <email@hidden>)

  • Prev by Date: move file - why does it not work?
  • Next by Date: Re: move file - why does it not work?
  • Previous by thread: move file - why does it not work?
  • Next by thread: Re: move file - why does it not work?
  • Index(es):
    • Date
    • Thread