Re: invisible files
Re: invisible files
- Subject: Re: invisible files
- From: "amine layachi" <email@hidden>
- Date: Mon, 04 Dec 2000 23:59:36 +0000
Don't use the Duplicate command of Finder application.
You should use instead copyFile command given by Jon's command scripting
addition.
Try this script :
set myFolder to (choose folder with prompt ("select folder to process"))
-- I add this line :
set destFolder to (choose folder with prompt ("select destination folder"))
set myFolderContents to list folder myFolder
repeat with x in myFolderContents
set thePath to (myFolder as text) & x
set theFile to thePath as alias
if folder of (info for theFile) is false then
copyFile theFile to destFolder -- I modified this line
end if
end repeat
----------
De : email@hidden
Date : Mon, 27 Nov 2000 12:49:26 -0800
@ : applescript <email@hidden>
Objet : invisible files
Thanks to everyone who responded to my "folder of" problem.
The trouble was indeed the conflicting use of folder by
the finder.
I'm now running into another problem. I'm working on a backup
application and I'd like to duplicate a folder of files,
including invisible files. However, the duplicate command
of the finder fails on an invisible file with the error:
"Finder got an error: because *0x//*the original item cannot
be found".
I can sort of understand how the finder might not work
properly with invisible files, but in that case, how does one
duplicate an invisible file?
on run
set myFolder to (choose folder with prompt ("select folder to process"))
set myFolderContents to list folder myFolder
repeat with x in myFolderContents
set thePath to (myFolder as text) & x
set theFile to thePath as alias
if folder of (info for theFile) is false then
tell application "Finder"
duplicate theFile
end tell
end if
end repeat
end run
_______________________________________________
applescript-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/applescript-users