move file - why does it not work?
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