[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Deleting files & interaction with AppleScript



>I've got two questions today. First, how do you have MacPerl delete a file? My
>Perl for dummies suggests unlink, which doesn't seem to work. Do you just
>rename it to the trash directory? And if so, do you rename it to the trash
>directory on the volume it's on, or to your own trash?

>I used the AppleScript record function to get the code, but when I run it from
>MacPerl, a dialog pops up asking me where Fetch is - even though it's got the
>exact path in proper AppleScript syntax.
>
>And the really strange thing is that when I copy the AppleScript back out of
>my MacPerl document, paste it into a new AppleScript window and try to run it,
>AppleScript asks me where Fetch is - even though it has the proper path -
>because the path was recorded in AppleScript initially. But AppleScript only
>asks me the first time. After that it can find Fetch.

Ann,
I have a script that ftps the contents of a folder on the network to our
web site, then copies the contents to a backup file on my machine, finally
deletes it from the original folder. Is this the kind of thing you're doing?

I use FSpFileCopy (from Mac::MoreFiles), FSpDelete (from Mac::Files) and
Net::FTP (as Paul mentioned) for the ftp stuff instead of applescripting
Fetch. The only applescript I need to use is to rename the file before ftp
if necessary. Is there a toolbox function for that, anyone?

Let me know if you'd like the script.

Kevin

Kevin Johnson
______________________

Fife School District
Phone: (253) 922-6695

http://www.fifeschools.com



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch