Applescript copy Files-Folders help.

Hello everybody,
I need your help on a copy files “ folders script issue. I have two folders A and B, I need a script that every time I copy a file or folder on A to copy the files or folders on B, I need the script for using with Launchd and lingon.
I am new on this Mac amazing world, so, I really need your help.

p.s. Sorry for my English, is not my native language…

Model: iMac,macbook
Browser: Firefox 3.0.5
Operating System: Mac OS X (10.5)

Hi Andy,

this is the classical purpose for a folder action like

on adding folder items to this_folder after receiving these_items
	tell application "Finder" to duplicate these_items to folder "MacHD:path:to:folder:"
end adding folder items to

replace the literal string with the path to folder B starting with the disk name and colon separated
save the script in /Library/Scripts/Folder Action Scripts
enable folder actions with the contextual menu and attach the script to folder A

Thanks for your reply my friend.
Your post was very helpful but doesn’t work for subfolders in any folder in the A folder. Maybe my first post wasn’t good enough, so let me re-query, what I really need is that every time I drop new songs in iTunes to copy these files-folders (mp3,artwork…) in my backup folder (lacie ethernet disk)… without any backup,synch program. I think the best way is with script and launchd (lingon),but where is the script??

What’s about to create a droplet or folder action import folder, which imports the files into iTunes and backups the files

Any example…? I checked that with folder actions if new folder added in a subfolder(compilations) nothing added in the remote backup folder.

an example of a hot folder.
Drag your files into it, then it will add them to iTunes and move (not duplicate !) them to your backup folder
Change the contents of the name extension list to the extensions you need

on adding folder items to this_folder after receiving these_items
	repeat with oneItem in these_items
		if (name extension of (info for oneItem)) is in {"mp3", "m4a", "m4b", "aif", "aiff", "wav"} then
			tell application "iTunes" to add oneItem
			do shell script "/bin/mv " & quoted form of POSIX path of oneItem & " '/Volumes/myDisk/path/to/Folder'"
		end if
	end repeat
end adding folder items to