Cannot delete JPGs

Started by Birdman, March 14, 2021, 08:42:42 AM

Previous topic - Next topic

Birdman

Hi there,

may be someone has an idea for my rather strange problem:
Under Win 10 I am working with a batch-file (cmd) to rename my pictures with exiftool and copy them in different folders. This works perfectly. After copying all files the files in the original folder are suppose to be deleted, using "del". This also works alright for all my raw-files (.CR3) and movies (.MP4). But all jpg-files are not deleted because of "Access denied". Since all files are in the same folder there should not be a problem with the folder rights.

Any idea anyone? Is there may be a way to delete via exiftool?

Just forgot: Deleting via the Win Explorer is no problem. Just via the command file.
Best regards,

Martin (Birdman)

StarGeek

Quote from: Birdman on March 14, 2021, 08:42:42 AMIs there may be a way to delete via exiftool?

Exiftool doesn't delete files.

This sounds like a permissions problem.  You could try adding the /f option to your delete command, e.g. del /f *.jpg  See here for details.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Birdman

Shouldn't be permissions, since all other files in the directory are deleted. Tried /f before, no difference. I installed a workaround now by renaming all JPG-files to .jpx with exiftool. As soon as the files have a different ending the delete will work. Really odd.
Best regards,

Martin (Birdman)

Birdman

Finally found the solution: Under Win10 - or if you use a different Anti Virus software - check if the so called Ransomware Protection is activated and is protecting the directories you encounter the problems with. Disabling the protection for those directories should solve the problem.
Best regards,

Martin (Birdman)