Main Menu

Error Creating File

Started by JonAgain, November 12, 2021, 07:06:37 PM

Previous topic - Next topic

JonAgain

Hi Everyone, I am in need of some help.  I am able to scan and locate files with ancestor data but when I try to remove the ancestor data I receive an error.  Please note that '/Portfolio/Frank' is a mapped network location.  I made sure the user has read/write access.  Also a little background, I am running this from Ubuntu VM as windows had limitations with special characters as well as character count.  Some of the info has been altered for privacy.  Any help to get around this error would be much appreciated.


user@Server01:/bin$ ./exiftool -overwrite_original_in_place '$directory/$filename' -r -if '$documentancestors and (()=$documentancestors =~ /, /g) > 100' -documentancestors= '/home/user@domain.LAN/Documents/Portfolio/Frank'
Error: File not found - $directory/$filename
Error: Error creating file: /home/user@domain.LAN/Documents/Portfolio/Frank/test file 1-1.jpg_exiftool_tmp - /home/user@domain.LAN/Documents/Portfolio/Frank/test file 1-1.jpg
Error: Error creating file: /home/user@domain.LAN/Documents/Portfolio/Frank/test file 2-1.jpg_exiftool_tmp - /home/user@domain.LAN/Documents/Portfolio/Frank/test file 2-1.jpg


Phil Harvey

What are you trying to do with '$directory/$filename' ?  This argument is treated as a filename, hence the first warning.

The other problem is more serious, and I don't know how to work around it.  Somehow the Perl "open" function is not able to create the specified file.  This uses the standard C file i/o routines, so I would think that other things should fail too.  Can you simply copy a file to this name (the ".jpg_exiftool_tmp" name) using "cp" on the command line?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JonAgain

I thought I had to '$directory/$filename' for it to be recursively process.  So are you saying I can just drop that and just use -r ?

In the meantime I figured out my problem.  I ran with elevated privileges and was able to update the files.  So this can pretty much be considered resolved.

StarGeek

Quote from: JonAgain on November 12, 2021, 08:34:48 PM
So are you saying I can just drop that and just use -r ?

As long as you pass exiftool a directory.  You can't pass /path/to/files/*.jpg,  you would have to use -ext jpg /path/to/files/  See Common Mistake #2 and the -r (-recurse) option.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype