You did change the relevant paths to reflect where your files are, right?
cd /path/to/Moved to Enlarged
assumes the source files are in a folder called 'Moved to Enlarged" inside a folder called “to” which is in a folder called “path” on the startup disk.
Since no one else knows exactly where your source files are, you need to adjust the script to your own needs.
set posixPath to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:Move to Thumbnail"
set shellCommand to "cd " & posixPath
do shell script shellCommand
set posixPath to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:"
set posix1 to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:Move to ThumbNail"
set Dest to quoted form of POSIX path of "WEBTEAM:Images:Products:ThumbNail:"
set shellCommand to "cd " & posixPath
set shellcom to "cd" & posix1
do shell script shellCommand & "; mv " & posix1 & " " & Dest
set posix1 to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:test folder:images:"
set Dest to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:desktop:"
do shell script "mv " & posix1 & " " & Dest
this will move the whole folder but i need it to move only the files how do i do it?
tell application "Finder" to set filesToMove to (every file of alias "Macintosh HD1:Users:jbradfield:Desktop:test folder:images:") as alias list
set Dest to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:desktop:"
repeat with thisFile in filesToMove
set posix1 to quoted form of POSIX path of thisFile
do shell script "mv " & posix1 & " " & Des
end repeat
If it works at all, I don’t know how it might handle situations where the destination folder already contains a file with the same name as a file which is being moved.
here is the final script for those interested
any sugestions would be appreciated
tell application "Finder"
activate
set buttonResult to display dialog "Do you want to mount server volumes?" buttons {"Yes", "Already Mounted", "Cancel"} default button 1
if button returned of buttonResult is "Yes" then
mount volume "smb://jbradfield:first@10.0.0.15/webteam"
mount volume "afp:/at/SNAP2:*"
--select file "startup script applet" of folder "bookmarks" of startup disk
--open selection
--display dialog "You chose the "yes" button" giving up after 2
else if button returned of buttonResult is "Already Mounted" then
--display dialog "You chose the "Already Mounted" button" giving up after 1
else if button returned of the buttonResult is "Cancel" then
error number -128
end if
set naiislist to list folder "Macintosh HD1:Users:jbradfield:Desktop:Move to Enlarged:" without invisibles
set graphlist to list folder "Macintosh HD1:Users:jbradfield:Desktop:Move to Graphics:" without invisibles
end tell
--============ Source Files =====================
set posixPath to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:desktop:"
set Thumb to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:Move to Thumbnail:"
set enlarged to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:Move to Enlarged:"
set graph to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:Move to Graphics:"
set test to quoted form of POSIX path of "Macintosh HD1:Users:jbradfield:Desktop:test folder:"
--============ Destinations =====================
set T_Dest to quoted form of POSIX path of "WEBTEAM:Images:Products:ThumbNail:"
set E_dest to quoted form of POSIX path of "WEBTEAM:Images:Products:Enlarged:"
set G_dest to quoted form of POSIX path of "graphics: ARCHIVE:Images:Catalog Number:"
--===========Shell scripts ======================
do shell script "mv " & Thumb & "* " & T_Dest -->this one works
do shell script "mv " & enlarged & "* " & E_dest -->this one works
if graphlist is not equal to {} then
do shell script "mv " & graph & "* " & G_dest -->this one works
end if
--=================================================
-->Send e mail to Robin <--
--=================================================
try
set out_filename to ((path to desktop folder) as string) & "the_list"
set out_file_id to open for access out_filename with write permission
on error
set the clipboard to naiislist
tell application "Microsoft Outlook" to CreateMail Body ("Please highlight this and paste the clipboard") Recipients "rdriscoll@chemicon.com" Subject (((number of items in naiislist)) & " New Images on NAIIS") as string with Display
--display dialog "could not open file for writing"
end try
repeat with i from 1 to count of items of naiislist
write (item i of naiislist) & return to out_file_id as string
end repeat
tell application "Microsoft Outlook"
--activate
CreateMail Body (read file out_filename) Recipients "rdriscoll@chemicon.com" Subject (((number of items in naiislist)) & " New Images on NAIIS") as string without Display
end tell
close access out_file_id
tell application "Finder" to delete file out_filename --"Macintosh HD1:Users:jbradfield:Desktop:da_list"