Aug 18, 2010; 04:13
njadams
Applescript to delete file from desktop
I'm sorry, I failed to mention that I am using FMP 9 Advanced on a
Powermac running OS 10.4.11
> Greetings,
>
> I have a DB that downloads stock quotes from Yahoo to the desktop
> in a csv file, imports the data into a table, then using
> Applescript, deletes the quotes file.
> tell application "Finder"
> activate
> if file "quotes.csv" exists then
> delete file "quotes.csv"
> end if
> end tell
>
> This works fine on my computer but will not work if I move the DB
> to another computer.
>
> I would like this solution to work an other computers so I came up
> with:
> tell application "Finder"
> set Quotes_File to "path to desktop folder:quotes.csv"
> tell application "Finder"
> activate
> if file "Quotes_File" exists then
> delete file "Quotes_File"
> end if
> end tell
> end tell
>
> This returns false, although when I run the script I can see the
> quotes file blink.
>
> Would someone tell me what the problem is.
>
> Thanks,
Nick
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/FileMaker/Browse/
Manage your subscription: http://www.ListSearch.com/FileMaker/