I am moving files to a folder via script. Today one file was not moved. It happened to be still open in
ACR (Photoshop camera raw). The script did not throw an error!
Here is the code I use:
async function moveFiles(files, folderName) {
var ids = '';
for (var mm = 0; mm < files.length; mm++) {
ids = ids + files[mm].id + ','
}
try {
await IMWS.post('v1/files/move', {
id: ids,
target: folderName,
replace: 'makeunique'
})
{
console.log('done, # moved files:' + files.length)
return true
}
}
catch (error) {
alert('move files error')
return false
}
}; //end of MoveFiles
What did IMWS return? Did you check the Network tab in your browser?
Your exception handler will only be called when IMatch returns something other than 200 OK.
IMWS should receive an error message from Windows and promote that to the client.
IMWS returns 200!
Then the operation succeeded or Windows did not return an error message to IMatch.
I shall investigate this at some later time.
Open a bug report so I can schedule a time slot.