ftp upload multiple files

in tried to build a script which uploads all files whithin a specified directory to a remote server. my problem is: the names of the files to send vary and I do not know how to put the unix-statement “mput *” in applescript?
any idea ?

I usually contruct the shell command before running it, inserting variables where needed. Here’s a quick example taken from a touch script that I use with Big Cat contextual menu plugin.

set shellCommand to "touch -c -m "
	repeat with thisFile in filelist
		if folder of (info for thisFile) is false then
			do shell script shellCommand & (quoted form of POSIX path of thisFile)
			tell application "Finder" to update thisFile
		end if
	end repeat

As written, the variable ‘fileList’ contains file references (aliases), so they need to be converted to paths that the shell understands. “quoted form of POSIX path of thisFile” takes care of that.