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

move file - why does it not work?


  • Subject: move file - why does it not work?
  • From: John Fowler <email@hidden>
  • Date: Sat, 4 Mar 2006 15:48:34 -0600

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.
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>
  • Prev by Date: Re: Script for guys who like bathing suits
  • Next by Date: Re: move file - why does it not work?
  • Previous by thread: RE: Applescript-users Digest, Vol 3, Issue 120
  • Next by thread: Re: move file - why does it not work?
  • Index(es):
    • Date
    • Thread