Export empty csv

Started by jknvenegas, May 02, 2023, 04:56:31 PM

Previous topic - Next topic

jknvenegas

Hi! im form méxico and my english is not the best.

I use exiftools some years ago to export metadata form jpg images. I use a BAT with the comand
exiftool.exe -k -csv *.jpg > tabla.csv
but today I used it and the created csv it's empty.
I search solutions on youtube, reading posts in this forum and trying diferents comand and the result its the same.
I need all the metainformation from a lot of pictures
Help me please! I don't want to type manually the information for more than 10k pictures

StarGeek

If that is the contents of the bat file, then I would guess that you have to move the bat file to the directory with the jpegs you want a csv for.

Also, it will not list files that are in subdiirectories.
"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

jknvenegas

Hi!
Sorry, I omitted to mention that the Exiftools.exe, the bat file and the JPG's are in the same folder.
In this way I did before and later I just cut and paste de app and the bat file to other folder with other photos and do it again.
I'm sure the photos have metadata

StarGeek

I can't replicate it here.  I copy/pasted your command into a bat file, ran the bat file from the desktop, and tabla.csv was created.
"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

jknvenegas

Yes! the comand can create the table, but it's generated empty, it's like the photos have not information, but i'm sure they have

StarGeek

To be clear, when I ran the command, a csv with all data from the file was created.

Example.  I added the -e (--composite) option so as not to list my extensive composite tags.  The result is the same whether I run it from the command line or running it from the desktop
Y:\!temp\aaaa>type test.bat
exiftool.exe -k -csv -e *.jpg > tabla.csv

Y:\!temp\aaaa>test.bat

Y:\!temp\aaaa>exiftool.exe -k -csv -e *.jpg  1>tabla.csv
    2 image files read
-- press ENTER --


Y:\!temp\aaaa>type tabla.csv
SourceFile,ExifToolVersion,FileName,Directory,FileSize,FileModifyDate,FileAccessDate,FileCreateDate,FilePermissions,FileType,FileTypeExtension,MIMEType,CurrentIPTCDigest,Keywords,ApplicationRecordVersion,ImageWidth,ImageHeight,EncodingProcess,BitsPerSample,ColorComponents,YCbCrSubSampling
Test3.jpg,12.62,Test3.jpg,.,446 kB,2023:04:28 11:01:05-07:00,2023:05:04 08:30:23-07:00,2023:04:16 12:00:00-07:00,-rw-rw-rw-,JPEG,jpg,image/jpeg,20b72bd6b193e82894b2f45f6955c59e,"Michaela, UK",4,1749,1205,"Baseline DCT, Huffman coding",8,3,YCbCr4:2:0 (2 2)
Test4.jpg,12.62,Test4.jpg,.,446 kB,2023:04:28 11:01:05-07:00,2023:05:04 08:30:32-07:00,2023:04:16 12:00:00-07:00,-rw-rw-rw-,JPEG,jpg,image/jpeg,9a7e68bb0e24f844b772ccdfd4eceaa5,"Marion, Mark, Michaela, UK",4,1749,1205,"Baseline DCT, Huffman coding",8,3,YCbCr4:2:0 (2 2)
"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

jknvenegas

#6
aaah! nothing works!

I'm trying in other computer, I put de exiftools.exe on WINDOWS Folder and give him Administrator Permisions
Later I run in the CMD the comand:
C:\Users\USUARIO>exiftool -csv >"C:\Users\USUARIO\Desktop\FOTOGRAFIAS\out.csv" "C:\Users\USUARIO\Desktop\FOTOGRAFIAS"
Then Exiftool run for a seconds and create the csv file, in the location, but when I open it, it's empty again! and i have 138 photos with meta data!

Also before, I put exiftools(-k) on my desktop and dropped the folder into the app and it read the Meta data! why it doesn't write the CSV!

I'm going crazy

Hubert

C:\Users\USUARIO>exiftool -csv C:\Users\USUARIO\Desktop\FOTOGRAFIAS > C:\Users\USUARIO\Desktop\FOTOGRAFIAS\out.csv

StarGeek

Quote from: Hubert on May 04, 2023, 03:51:51 PMC:\Users\USUARIO>exiftool -csv C:\Users\USUARIO\Desktop\FOTOGRAFIAS > C:\Users\USUARIO\Desktop\FOTOGRAFIAS\out.csv

Location of the redirect doesn't matter. It doesn't have to be at the end. For example
Y:\!temp\aaaa>exiftool -e -ext jpg -csv >test.csv Y:\!temp\aaaa
    1 directories scanned
    2 image files read

Y:\!temp\aaaa>type test.csv
SourceFile,ExifToolVersion,FileName,Directory,FileSize,FileModifyDate,FileAccessDate,FileCreateDate,FilePermissions,FileType,FileTypeExtension,MIMEType,CurrentIPTCDigest,Keywords,ApplicationRecordVersion,ImageWidth,ImageHeight,EncodingProcess,BitsPerSample,ColorComponents,YCbCrSubSampling
Y:/!temp/aaaa/Test3.jpg,12.62,Test3.jpg,Y:/!temp/aaaa,446 kB,2023:04:28 11:01:05-07:00,2023:05:04 14:20:05-07:00,2023:04:16 12:00:00-07:00,-rw-rw-rw-,JPEG,jpg,image/jpeg,20b72bd6b193e82894b2f45f6955c59e,"Michaela, UK",4,1749,1205,"Baseline DCT, Huffman coding",8,3,YCbCr4:2:0 (2 2)
Y:/!temp/aaaa/Test4.jpg,12.62,Test4.jpg,Y:/!temp/aaaa,446 kB,2023:04:28 11:01:05-07:00,2023:05:04 14:20:05-07:00,2023:04:16 12:00:00-07:00,-rw-rw-rw-,JPEG,jpg,image/jpeg,9a7e68bb0e24f844b772ccdfd4eceaa5,"Marion, Mark, Michaela, UK",4,1749,1205,"Baseline DCT, Huffman coding",8,3,YCbCr4:2:0 (2 2)

jknvenegas, just to verify, the files are in C:\Users\USUARIO\Desktop\FOTOGRAFIAS and not in any subdirectories.

cd to that directory and type
dir | clip
then come back here and paste the captured output.
"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

jknvenegas

#9
I'm back.
Now I tried on my personal computer, so the user it's other.
First I used the comand posted above, the app runs, but again it create the empty csv. Then I type DIR and this is the result, you can see the empty csv.

C:\Users\jknve>exiftool -csv C:\Users\jknve\Desktop\FOTOGRAFIAS > C:\Users\jknve\Desktop\FOTOGRAFIAS\out.csv

C:\Users\jknve>
C:\Users\jknve>cd desktop

C:\Users\jknve\Desktop>cd fotografias

C:\Users\jknve\Desktop\FOTOGRAFIAS>dir
 El volumen de la unidad C es Windows
 El número de serie del volumen es: FA90-75CB

 Directorio de C:\Users\jknve\Desktop\FOTOGRAFIAS

04/05/2023  05:32 p. m.    <DIR>          .
04/05/2023  05:32 p. m.    <DIR>          ..
25/02/2020  01:31 a. m.         9,502,838 03022020-_MG_0420.jpg
25/02/2020  01:31 a. m.        10,550,579 03022020-_MG_0422.jpg
25/02/2020  01:30 a. m.         9,896,491 03022020-_MG_0424.jpg
25/02/2020  01:31 a. m.        10,322,878 03022020-_MG_0425.jpg
25/02/2020  01:31 a. m.        10,730,577 03022020-_MG_0426.jpg
25/02/2020  01:30 a. m.        11,129,421 03022020-_MG_0427.jpg
25/02/2020  01:31 a. m.         7,699,086 03022020-_MG_0430.jpg
25/02/2020  01:31 a. m.        11,230,505 03022020-_MG_0432.jpg
25/02/2020  01:31 a. m.         9,716,487 03022020-_MG_0434.jpg
25/02/2020  01:31 a. m.         7,857,333 03022020-_MG_0435.jpg
04/05/2023  05:32 p. m.                 0 out.csv
              11 archivos     98,636,195 bytes
               2 dirs  523,413,237,760 bytes libres

C:\Users\jknve\Desktop\FOTOGRAFIAS>

I try this comand
C:\Users\jknve\Desktop\FOTOGRAFIAS>exiftool -r C:\Users\jknve\Desktop\FOTOGRAFIAS -kand it show all the data!

Finally I try this comand
C:\Users\jknve>exiftool -all -csv C:\Users\jknve\Desktop\FOTOGRAFIAS > C:\Users\jknve\Desktop\FOTOGRAFIAS\out.csv -kand the app runs and pause, it show all the data and in the bottom, it show this
C:/Users/jknve/Desktop/FOTOGRAFIAS/out.csv,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C:/Users/jknve/Desktop/FOTOGRAFIAS,,,,,,File is empty,,12.61,,,,,,,2023:05:04 17:50:03-06:00,2023:05:04 17:49:32-06:00,2023:05:04 17:50:03-06:00,out.csv,-rw-rw-rw-,0 bytes
So, I think, may be in this part it's the error, but I don't now

StarGeek

Quote from: jknvenegas on May 04, 2023, 07:41:13 PMI try this comand
C:\Users\jknve\Desktop\FOTOGRAFIAS>exiftool -r C:\Users\jknve\Desktop\FOTOGRAFIAS -kand it show all the data!

That seems to indicate the the problem is writing the data to the file, not a problem with exiftool itself.

At this point, I would think it's a permission problem.  Or some other write problem.  Is C: an SSD?  If so, check to see if it's become write protected.  That's the first sign of drive failure for SSDs.

As for permissions, I don't know.  You said you ran the command line as admin, so that should avoid all permission problems
"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

jknvenegas

Oh! YES! I made it!!

Just like you said, the comands were OK, but I wasn't trying to run de CMD like administrator before.

Thank you very much!! Now I can give my boss the información for more than 10k photos in a few seconds!