Problems copying some files
Problems copying some files
- Subject: Problems copying some files
- From: Bjorn Van Blanckenberg <email@hidden>
- Date: Mon, 01 Jul 2002 10:18:24 +0200
I don't know what I'am doing wrong but can't get anny kind of file copied to
the right folder and if it copy it copy every item to every targetfolder
Script ask settings like client, jobnumber, page and set the targetfolders
And then I want to sort the dropped files, files within folders and copy
them to the targetfolders.
Quarkdoc to origin folder
Make an dupli and place it in layout folder
Images to the image folder
Illustrations to the illustration folder
property chosen_Client : ""
property targetClientfolder : ""
property chosen_job : ""
property targetJobfolder : ""
property chosen_page : ""
property targetPagefolder : ""
property Quarkfolder : "origin"
property Quarktwofolder : "layout"
property Photofolder : "images"
property Illfolder : "illustrations"
property Otherfolder : "temp"
property target_OXP_folder : ""
property target_OXPtwo_folder : ""
property target_Photo_folder : ""
property target_Ill_folder : ""
property target_Other_folder : ""
property quark_documents : {}
property image_documents : {}
property illustration_documents : {}
property others_documents : {}
on open theItems
tell application "Finder"
my showSettingsDialog()
repeat with thisItem in theItems
if last character of (thisItem as text) is ":" then
try
set quark_documents to (every file of entire contents of thisItem whose kind
is not "alias" and ,
the file type is "XDOC" and file creator is "XPR3" or ,
the file type is "XTMP" and file creator is "XPR3")
set image_documents to (every file of entire contents of thisItem whose kind
is not "alias" and ,
the file type is "EPSF" and file creator is "8BIM" or ,
the file type is "TIFF" and file creator is "8BIM" or ,
the file type is "EPSF" and file creator is "LCS6" or ,
the file type is "TIFF" and file creator is "LCS6") as list
set illustration_documents to (every file of entire contents of thisItem
whose kind is not "alias" and ,
the file type is "EPSF" and file creator is "ART5" or ,
the file type is "EPSF" and file creator is "FH50" or ,
the file type is "EPSF" and file creator is "FH70" or ,
the file type is "EPSF" and file creator is "FH80" or ,
the file type is "EPSF" and file creator is "FH90" or ,
the file type is "EPSF" and file creator is "FH X") as list
set others_documents to (every file of entire contents of thisItem whose
kind is not "alias" and ,
the file type is not "XDOC" or the file type is not "XTMP" or ,
the file type is not "EPSF" or the file type is not "TIFF") as list
end try
else
set quark_documents to (every file of thisItem whose kind is not "alias" and
,
the file type is "XDOC" and file creator is "XPR3" or ,
the file type is "XTMP" and file creator is "XPR3") as list
set image_documents to (every file of thisItem whose kind is not "alias" and
,
the file type is "EPSF" and file creator is "8BIM" or ,
the file type is "TIFF" and file creator is "8BIM" or ,
the file type is "EPSF" and file creator is "LCS6" or ,
the file type is "TIFF" and file creator is "LCS6") as list
set illustration_documents to (every file of thisItem whose kind is not
"alias" and ,
the file type is "EPSF" and file creator is "ART5" or ,
the file type is "EPSF" and file creator is "FH50" or ,
the file type is "EPSF" and file creator is "FH70" or ,
the file type is "EPSF" and file creator is "FH80" or ,
the file type is "EPSF" and file creator is "FH90" or ,
the file type is "EPSF" and file creator is "FH X") as list
set others_documents to (every file of thisItem whose kind is not "alias"
and ,
the file type is not "XDOC" or the file type is not "XTMP" or ,
the file type is not "EPSF" or the file type is not "TIFF") as list
end if
Try
move quark_documents to folder target_OXP_folder
repeat with i from 1 to number of items of quark_documents
tell application "Finder"
set quark_document to item i of quark_documents
set Filename to quark_document as text
set New_quark_document to duplicate quark_document to folder
target_OXPtwo_folder
set name of New_quark_document to "(C) " & Filename
end tell
end repeat
move image_documents to folder target_Photo_folder
move illustration_documents to folder target_Ill_folder
move others_documents to folder target_Other_folder
end try
end repeat
end tell
end open
on showSettingsDialogOne()
Here I ask some settings like client and jobnumber and page
And set the target folders
set target_OXP_folder to (targetClientfolder & ":" & targetJobfolder & ":" &
targetPagefolder & ":" & Quarkfolder)
set target_OXPtwo_folder to (targetClientfolder & ":" & targetJobfolder &
":" & targetPagefolder & ":" & Quarktwofolder)
set target_Photo_folder to (targetClientfolder & ":" & targetJobfolder & ":"
& targetPagefolder & ":" & Photofolder)
set target_Ill_folder to (targetClientfolder & ":" & targetJobfolder & ":" &
targetPagefolder & ":" & Illfolder)
set target_Other_folder to (targetClientfolder & ":" & targetJobfolder & ":"
& targetPagefolder & ":" & Otherfolder)
end showSettingsDialogOne
--
Oooo.
oooO ( )
( ) ) /
\ ( (_/
\_)
Thanks
Bjorn Van Blanckenberg
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.