Error: File not found - "-FileModifyDate=2019:12:21 23:05:02+08:00"

Started by kingvhit, December 21, 2019, 12:25:21 PM

Previous topic - Next topic

kingvhit

Hi Phil,

I have run the exiftool with bellow command and still get some problems.

exiftool "-FileModifyDate=2019:12:21 23:05:02+08:00" -overwrite_original /storage/emulated/0/DCIM/Camera/IMG_20191220_174514.jpg
Error: File not found - "-FileModifyDate=2019:12:21 23:05:02+08:00"

I have do it on Android, then the expected results are that I want to edit specific tag from a photo, the value of this tag in containing a white space like above then I added quote character. It is working well when I don't use the quote characters

exiftool -FileModifyDate=2019:12:21 23:05:02+08:00 -overwrite_original /storage/emulated/0/DCIM/Camera/IMG_20191220_174514.jpg

but may it not update the following time after white space character.

Could you help :)

One more question, I have finished and deployed the Android Application on Google Play, could you stick this application on the home page.

kingvhit

Using a single quote still not working as well.

exiftool '-UserComment=    hgufyfyftello hihijivy hvvyvyv.bch.      ' -overwrite_original /storage/emulated/0/DCIM/Camera/IMG_20191220_174514.jpg

> Error: File not found - '-UserComment=    hgufyfyftello hihijivy hvvyvyv.bch.   

-----
exiftool -UserComment='    hgufyfyftello hihijivy hvvyvyv.bch.      ' -overwrite_original /storage/emulated/0/DCIM/Camera/IMG_20191220_174514.jpg
> Working OK on some field with string type like a comment but with the field is an integer or double it throw invalid format
Warning: Not a floating point number for IFD0:XResolution
    Nothing to do.

StarGeek

I'm not sure how much help we can be as any Android version of Exiftool has not been created by Phil.

Searching around the net for "Command line Android Argument with space", I see multiple results with a variety of search/replace solutions.
"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

Phil Harvey

It looks like the Android command shell does not parse arguments in quotes like all other shells I know.  You have to figure out the quoting and/or escape rules for the command shell you are using on Android.

- 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 ($).

kingvhit

the shell of Android-based Linux architecture. I mean that the quote single character must be passed but didn't know why the error is throwed

kingvhit

Don't use a single quote or double quote characters still not working. I am setting the value of it into a variable named `TAG_DATA`, then try this comment.

bin/perl /exiftool/exiftool -UserComment=$TAG_DATA -overwrite_original /storage/emulated/0/DCIM/Camera/IMG_20191220_174514.jpg"


still error=2, No such file or directory

kingvhit

Updated, tried to on My Mac Book.

/Users/mbp0015/perl5/perlbrew/perls/perl-5.28.0/bin/perl /usr/local/bin/exiftool -UserComment="   Hello this is aa     " IMG_20191206_200219.jpg
or
/Users/mbp0015/perl5/perlbrew/perls/perl-5.28.0/bin/perl /usr/local/bin/exiftool -UserComment='   Hello this is aa     ' IMG_20191206_200219.jpg
OK, this command is working
    1 image files updated

But try to check the data
exiftool -UserComment -T -j IMG_20191206_200219.jpg

result
[{
  "SourceFile": "IMG_20191206_200219.jpg",
  "UserComment": {
    "id": 37510,
    "table": "Exif::Main",
    "val": "   Hello this is aa"
  }
}]

It mean we lost the space in the end of comment

StarGeek

Interesting.  The trailing spaces get trimmed for UserComment, but not for others

C:\>exiftool -P -overwrite_original  "-ImageDescription=   Hello this is aa     " "-UserComment=   Hello this is aa     " "-description=   Hello this is aa     " y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -j -usercomment -description -ImageDescriptiony:\!temp\Test4.jpg
[{
  "SourceFile": "y:/!temp/Test4.jpg",
  "UserComment": "   Hello this is aa",
  "Description": "   Hello this is aa     ",
  "ImageDescription": "   Hello this is aa     "
}]


UserComment is listed as undef on the Exif tag page, while the other two are strings.

As for keeping spaces while on android, try escaping them with a backslash.
"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

Phil Harvey

If I recall correctly, the Exif specification recommends filling empty values with spaces, so ExifTool trims them when extracting.

- 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 ($).

kingvhit

OK, I got it, thank you.

Still can't use a single quote or double quote or backslash on Android now, I still find the other solutions. Thank Phil Harvey and StarGeek.