Re: Copying files via applescript
Re: Copying files via applescript
- Subject: Re: Copying files via applescript
- From: email@hidden
- Date: Wed, 9 Jun 2004 19:30:50 -0400
I am trying to make an applescript to copy all the files in a folder
to a USB memory card. and if the file already exists on the card to
keep which ever version is most current.
...
but how do i get it to keep the most recent?
01. None of the provided code checks the version of the LEXAR_MEDIA
based files to the hard disk drive based files. I am therefore
assuming that you are assuming, that the files in the hard disk
drive's 'labs' folder are the most current and you just want to copy
them onto the LEXAR_MEDIA RAM card.
02. A modified version of your code is shown below:
tell application "Finder" -- Needed for the 'duplicate' Function.
set labsFolder to (((path to home folder from user domain) as string)
& "Documents:JavaProgs:labs:")
set destFolder to "LEXAR_MEDIA:JavaProgs:"
duplicate (folder labsFolder) to (folder destFolder) with replacing
end tell
one other question this script runs fine but if i change both "labs"
to "assignments" it opens up the little copying window, copies the
files, but then says there was an error. and when i look at the
memory card nothing was copied. any idea wutz happenin?
I do not know about the 'error' you received; but, based on your code
- the 'assignments' folder is being saved in the
'LEXAR_MEDIA:JavaProgs:labs' Folder; not in the
'LEXAR_MEDIA:JavaProgs' Folder - which presently contains the 'labs'
Folder.
P.S.
I have a SONY RAM card and tested the above modified code. It worked
as expected.
[ System: dual 500 MHZ G4 PPC PM, 1 GB RAM, 360 GB storage; MacOS X
10.3.4; Script Editor 2.0; Sony 256 MB RAM card ]
--
SJWL
No Intel / Intel clone PC's were harmed in the creation of this reply.
_______________________________________________
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.