Re: Question
Re: Question
- Subject: Re: Question
- From: Peter Waibel <email@hidden>
- Date: Thu, 16 Mar 2006 13:29:07 +0100
I had similar problems duplicating files to a folder.
Try something like this:
tell application "Finder"
duplicate file filePath to folder folderPath
update folder folderPath
update file (folderPath & fileName)
end tell
delay 1
try
(folderPath & fileName) as alias
set isDupFile to true
on error
set isDupFile to false
end tell
Peter
Am 16.03.2006 um 13:11 schrieb stephan:
I am in front of a weird situation.
In one of my solution there is a script to copy images and then set
a flag
in FileMaker to let me know that the images have been copied. To
set the
flag, I verify after the copy to see if the images are in the
folder and
they are there I set the flag.
The weird thing is sometimes for I don't know what reason the flag
is set
but the image is not in the folder!!!???
Here is the script I am using:
--tell application "FileMaker Pro"
copy cell "img_Where_Path_CTE" of current record of document
"inuse.fp5" to
folderPath
copy cell "img_Name_CT" of current record of document "inuse.fp5" to
myNomPhoto
copy cell "img_Path_CTE" of current record of document "inuse.fp5" to
myPathPhoto
--end tell
tell application "Finder"
activate
try
duplicate file myPathPhoto to folder folderPath with replacing
if (exists file ((folderPath & myNomPhoto) as string)) then
tell application "FileMaker Pro"
set cell "copy_Warn_N" of current record of document
"inuse.fp5" to 1
end tell
end if
set owner privileges of file ((folderPath & myNomPhoto) as
string)
to read write
set group privileges of file ((folderPath & myNomPhoto) as
string)
to read write
set pictureCount to pictureCount + 1
on error
set errorCount to errorCount + 1
end try
end tell
Thanks in advance to all!
--
Stephan Adam
Stephan Adam Consultant inc.
Solutions d'automatisation
www.saconsultant.com
email@hidden
Cell. : (514) 944-6139
Membre associé, Filemaker Solutions Alliance
Associate Member, Filemaker Solutions Alliance
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40opix.de
This email sent to email@hidden
Grüße aus Berlin
Peter Waibel
--------------------------------
Opix AG
Peter Waiibel
Am Borsigturm 46
13357 Berlin
Fon: +49 30 4303 4421
Fax: +49 30 4303 4409
email@hidden
email@hidden
email@hidden
http://www.opix.de
--------------------------------
_______________________________________________
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
References: | |
| >Question (From: stephan <email@hidden>) |