I am trying to move files based on an excel sheet. The image name is in column M (13) (I am getting the other values because they will have image names as well. I’m just trying to get one to work at this point.)
I am able to retrieve the image name from the excel file but when I tell finder to duplicate it says it can’t make alias.
I think I’m close, but obviously missing something. Any help is greatly appreciated.
Here’s what I have so far:
property firstColumn : "A"
property LastColumn : "AG"
property firstRow : 2
set myDoc to "HOM_Shortrun:x_Move Images Test:Supermerge.test.xls"
set myFolder to "HOM_Shortrun:x_Move Images Test:Test Destination:"
set sourceFolder to "HOM_Shortrun:x_Move Images Test:Test Source:"
tell application "Microsoft Excel" to open myDoc
set x to firstRow
repeat
tell application "Microsoft Excel" to set {v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, 25, v26, v27, v28, v29, v30, v31, v32, v33} to item 1 of (get value of range (firstColumn & x & ":" & LastColumn & x))
if v1 is "" then exit repeat
if v13 is not "" then set image1 to v13
tell application "Finder"
duplicate image1 of sourceFolder as alias to myFolder as alias
end tell
set x to x + 1
end repeat