Reading current directory twice

Started by Thorkil, January 21, 2018, 05:50:51 AM

Previous topic - Next topic

Thorkil

Hi

First I do this: dir *.mp3   
It tells me that I have 67 files in current directory

Then I do:
D:\G1201\Hygge\G12_C1\L>dir *.mp3 /s

     Total Files Listed:
             104 File(s)    401.309.217 bytes
               0 Dir(s)  136.990.490.624 bytes free

D:\G1201\Hygge\G12_C1\L>exiftool *.mp3 -j -r . > nul
    4 directories scanned
  171 image files read

It is the current directory that is being read twice, since 67 + 104 = 171
If I pipe to a file, all the MP3's in the current directory is doubled

What can I do ?

Best regards
Thorkil

Thorkil

Thanks for a nice program and a quick reply.

Can I squeze this a bit more: What I am actually after is files where the string :m followed by three digits, like M:345 og m:666
Zero is not allowed. Low=111 and high is 999

Thanks in advance
/T

Phil Harvey

Hi Thorkil,

Quote from: Thorkil on January 21, 2018, 05:50:51 AM
D:\G1201\Hygge\G12_C1\L>exiftool *.mp3 -j -r . > nul
    4 directories scanned
  171 image files read

"*.mp3" processes all mp3 files in the current directory
"." processes all writable files in the current directory

You have both, but mp3 files are not writable, so they won't get processed.  But apparently there are 171 other writable files in this directory.

I think you asked your "M:" question in another thread.

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

Thorkil

This one did the trick.

exiftool -if "$Comment =~ /m:/i" -j -r -ext mp3 \G1201\Hygge\G12_C1 > \G1201\Hygge\G12_C1\g12_c1.json

Something with the "." (dot) the confuses bothe me and exiftool  :-)