Shell Script Stopped Working

My only explanation to why this script no lnoger works is apple changed something in one of the past 2 Panther updates that will not allow this shell script to run correctly

Basicly i have a droplet script that, when i drop a finder selection of PDFs and Excel files it will:

  1. Make a thumbnail jpg of the pdf
  2. Copies the PDF to a network volume
  3. Moves the jpg to a network volume
  4. send an email with the XLS file attached to someone and the name of the file(S) moved to the network

All was fine until the recent apple updates
the problem is in the MV command for the shell script
I think it is not correcly recognizing the spaces in the path

can anyone help?

on open theList
     set source_path_thumbs to "Macintosh HD:Users:jbradfield:Desktop:move to MktThumbnails:" -- Temp location to save jpg file to
     display dialog "Is this an Ad?" buttons {"Yes", "No"} default button 2
     if the button returned of the result is "Yes" then
          set target_path_thumbs to " DEPTS:CHEMICON:Marketing:Literature:Thumbnails: ADS:" -- Target ddestination for jpg thumbnails if Ad
          
                    else
          set target_path_thumbs to "DEPTS:CHEMICON:Marketing:Literature:Thumbnails:" -- Target ddestination for jpg thumbnails
     end if
     
     
     set target_path_pdfs to "DEPTS:CHEMICON:Marketing:Literature:PDFs:" -- Target path for the PDFs
     repeat with i in theList
          set theinfo to info for i
          if file type of theinfo is not "XLS8" then
               set chosen_file to i as alias -- (choose file) as alias -- Choose your PDF file here
               set current_name to displayed name of (get info for chosen_file) -- Get the name of the PDF file
               
               tell application "Adobe Photoshop 7.0"
                    set display dialogs to never
                    open chosen_file as PDF with options {width:3, page:1, resolution:72, mode:RGB, constrain proportions:true} -- opens the PDF as a 3" wide 72 dpi image
                    tell current document
                         flatten
                         save in ((source_path_thumbs & current_name) as file specification) as JPEG with options {quality:5} appending lowercase extension --saves the jpg to the temp location
                         close saving no
                    end tell
               end tell
               try
                    mount volume "smb://10.3.0.22/depts"
               end try
               do shell script "cp " & (quoted form of POSIX path of chosen_file) & " " & (quoted form of POSIX path of target_path_pdfs) -- copies the PDF to the PDF destination
               do shell script "mv " & (quoted form of POSIX path of source_path_thumbs) & "* " & (quoted form of POSIX path of target_path_thumbs) -- moves the files from the temp folder to the Thumbnail folder
          end if
     end repeat
     
     tell application "Microsoft Entourage"
          make new outgoing message with properties {recipient:"rdriscoll@chemicon.com", subject:("New Literature " & current_name), attachment:(theList)}
          set messID to the result
          send messID
     end tell
     
     
end open

on run
     set p to choose file with prompt "find me a PDF file"
     set x to choose file with prompt "find me a xls file"
     set y to {p, x} as list
     open (y as list)
end run

I don’t know if this is related or not, but you should probably be using MvMac and CpMac instead of mv and cp.

My “mv” and “cp” all still work fine. What are exactly the errors/behaviours you experiment?

I am not super profecient in terminal scripting
what is the difference?
Update – i just read the man pages and it states
“BUGS
Currently doesn’t work across volumes/filesystems.”

it has also been sugested to use ditto

but these files will only be accessed by PC users so the resourse frk info is not important to me

but i did find my problem in this line
set target_path_thumbs to " DEPTS:CHEMICON:Marketing:Literature:Thumbnails: ADS:" – Target ddestination for jpg thumbnails if Ad

the xtra space if you can believe it

" DEPTS:… should be "DEPTS:…

its always the litttle things that get us huh
thanks for your help anyways