move file on mounted server volume

Can a file on a mounted server volume be moved to another folder on that server using Applescript?

I have been working on this for hours now, trying every trick that I could find. Here is the code I wound up with:


set thefile to "0400_galaxy.jpg"
set submitfolder to "Design_Database:Data:Mediabase:Submit:" as alias
set collectionfolder to "Design_Database:Data:Mediabase:Collection:" as alias
tell application "Finder"
	move thefile of folder submitfolder to collectionfolder
end tell

When I drag the file into script editor, I get:

/Volumes/Design_Database/Data/Mediabase/Submit/0400_galaxy.jpg

The event log shows:


tell application "Finder"
	move thefile of folder (alias "Design_Database:Data:Mediabase:Submit:") to alias "Design_Database:Data:Mediabase:Collection:"
		"Finder got an error: Can't get thefile of folder (alias \"Design_Database:Data:Mediabase:Submit:\")."

I’ve tried dropping the : at the end of the folder names, tried using the paths directly instead of assigning variables, and tried every iteration of code that I could find examples of. No luck yet.

Thanks…
Matt

Hi Matt,

a file can be moved. but not a string :wink:
in addition you have defined submitfolder as an alias, so folder [alias] submitfolder cannot work.

set thefile to "0400_galaxy.jpg"
set submitfolder to "Design_Database:Data:Mediabase:Submit:"
set collectionfolder to "Design_Database:Data:Mediabase:Collection:"
tell application "Finder"
	move file thefile of folder submitfolder to folder collectionfolder
end tell

Thanks much for the fast reply!

Matt