Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mr_Questor

macrumors newbie
Original poster
Jan 17, 2018
2
0
Here is the code that I am using:

Code:
set {year:yr, month:mn, day:dy} to (current date)

set dateString to pad(mn as integer) & "_" & pad(dy) & "_" & (yr as text)

on pad(v)
    return text -2 thru -1 of ((v + 100) as text)
end pad

set fileString to "LaCie:Dash Cam:Week C:" & dateString

tell application "Finder"
    make new folder at folder "LaCie:Dash Cam:Week C" with properties {name:dateString}
    move every file of folder "DASH_CAM:DCIM:NORMAL" to folder fileString with replacing
end tell

The folder gets created. However, the files do not move. I get the error:
"Finder got an error: The operation can’t be completed because some items had to be skipped. “2018_0126_123743_001A.MP4”" number -15266

Here is a screen shot of what I am talking about:

Screen Shot 2018-01-27 at 4.43.08 PM.png
 
Last edited by a moderator:
I think you need to do some spit by step debugging here. Maybe you don't have appropriate permissions for one or more files?

If you think a rogue file might be the problem then another technique might be to iterate through the files on the destination and use "try" and "on error" to report an error for the individual file, then continue with the rest.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.