iOS 9 new [Keys] CreationDate tag

Started by wywh, May 14, 2020, 01:40:20 PM

Previous topic - Next topic

Phil Harvey

Hi Matti,

I'm sorry I haven't had the time to read all your lengthy posts.  But I read the last one and couldn't find any clear questions to answer.

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

StarGeek

Quote from: wywh on June 09, 2020, 02:06:13 PM
BTW, where does the computer query the DST info?

I could be wrong, but I would guess that it gets it from Perl's localtime() function.  Exiftool also has Time::Piece included so maybe that.
"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

wywh

#17
The command which sets movie dates to existing [Keys], [UserData], [QuickTime], [FileCreateDate] and [FileModifyDate] tags from the YYYY-MMDD-hhmm-ss filename seems to work so well that I am going to fix all my old movies with it:

exiftool -m -P -overwrite_original_in_place -wm w -api QuickTimeUTC=1 "-CreateDate<filename" "-ModifyDate<filename" "-Track*Date<filename" "-Media*Date<filename" -execute -m -P -overwrite_original_in_place -wm w "-FileCreateDate<filename" "-FileModifyDate<filename" -execute -m -P -overwrite_original_in_place -wm w "-Keys:CreationDate<FileModifyDate" "-UserData:DateTimeOriginal<FileModifyDate" -common_args movie.*

I am a novice in this so I just want to make sure I am not making any stupid mistakes (I do have backups).

I had to break those commands into three parts separated with -execute. Or is there a way to put them into a single command?

Anyway, exiftool makes those three rounds quite fast (for example: 160 movies & 41 GB takes about three minutes on Mac mini 2018 with its sequential read/write of about 2.6 GB/s).

Previously I used an app which uses exiftool under the hood. But for some reason it doesn't currently handle DST correctly in movies with this filename to datetimes task. Even with its UTC setting it is +-1hour off if the DST when it is run differs from the DST when the movie was taken. That caused the movies to be out of sync with the corresponding well behaving images. And currently it doesn't touch [UserData] which some movies have and Photos.app 5.0 uses after [Keys] and before [QuickTime] and [FileCreateDate].

thanks,

- Matti

StarGeek

Quote from: wywh on June 13, 2020, 07:12:57 AM
I had to break those commands into three parts separated with -execute. Or is there a way to put them into a single command?

The first two parts, writing the tags and file system dates from the filename can be combined.  The other two that need the time zone would have to be separate. 

But you can put all of -m -P -overwrite_original_in_place -wm w after the -Common_Args option.  Try this
exiftool -api QuickTimeUTC=1 '-CreateDate<filename' '-ModifyDate<filename' '-Track*Date<filename' '-Media*Date<filename' '-FileCreateDate<filename' '-FileModifyDate<filename' -execute '-Keys:CreationDate<FileModifyDate' '-UserData:DateTimeOriginal<FileModifyDate' -common_args -m -P -overwrite_original_in_place -wm w movie.*

I also changed all the double quotes to single quotes (you're on a Mac, right?) because it's a good habit to get into using exiftool on Mac/Linux.  If you need to use a command with a $TAGNAME format, double quotes will cause problems for you.
"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

wywh

Quote from: StarGeek on June 13, 2020, 10:35:11 AM
The first two parts, writing the tags and file system dates from the filename can be combined.  The other two that need the time zone would have to be separate. 

I also changed all the double quotes to single quotes (you're on a Mac, right?) because it's a good habit to get into using exiftool on Mac/Linux.  If you need to use a command with a $TAGNAME format, double quotes will cause problems for you.

Thanks for the info! I reconstructed the command by trial and error and at one point used single quotes only where double quotes didn't work.

But as I wondered in my earlier message, for some reason '-FileCreateDate<filename' works only on its own. If it is combined with another command, then FileCreateDate moves only forwards in time even with Xcode command line tools' SetFile installed.

- Matti

StarGeek

Quote from: wywh on June 13, 2020, 03:48:59 PM
But as I wondered in my earlier message, for some reason '-FileCreateDate<filename' works only on its own. If it is combined with another command, then FileCreateDate moves only forwards in time even with Xcode command line tools' SetFile installed.

Hmmm... I can't really help here, as I'm on Windows.  I do recall that there are some oddities regarding that tag on a Mac.
"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

wywh

#21
To cut the long story short, I used the following command to fix the dates in all my old movies with a filename YYYY-MMDD-hhmm-ss.*. In macOS the command asks for Xcode Command Line Tools install which can be ignored but then the FileCreateDate moves only backwards in time (the install is quite small and fast, not the huge Xcode install).

exiftool -api QuickTimeUTC=1 '-CreateDate<filename' '-ModifyDate<filename' '-Track*Date<filename' '-Media*Date<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -execute '-Keys:CreationDate<FileModifyDate' '-UserData:DateTimeOriginal<FileModifyDate' -common_args -m -P -overwrite_original_in_place -wm w movies.*

In macOS 10.14-10.15 it works for 1904-01-01 01.39.50 or later for [QuickTime] and 1677-09-21 01.52.33 or later for [Keys] and [UserData] tags:

exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all *.m4v

[QuickTime]     CreateDate                      : 1904:01:01 01:39:50+01:39

[Keys]          CreationDate                    : 1677:09:21 01:52:33+01:40
[UserData]      DateTimeOriginal                : 1677:09:21 01:52:33+01:40


With the "-wm w" switch it modifies only existing date tags and doesn't add any new (those [Keys] and [UserData] tags seem to support year 0001 or later if they are set with a targeted command).

macOS 10.15 Catalina Photos.app 5.0 seems to grab the date in the following order for m4v, mp4 and mov:

1. [Keys] CreationDate. (Notice that if a timezone like +02:00 is omitted in m4v and mp4, Photos.app 5.0 scrambles the date to something like "177294").

2. [UserData] DateTimeOriginal. (Notice that if a timezone like +02:00 is omitted in m4v and mp4, Photos.app 5.0 scrambles the date to something like "177294". mov files seem to ignore this tag).

3. [QuickTime] CreateDate. UTC time should be used.

4. [System] FileCreateDate.

So if there is no other metadata in the movie, as a last resort Photos.app 5.0 gets it from the file creation date.

Catalina Photos.app 5.0 seems to ignore these date tags:
[XMP-exif]      DateTimeOriginal                : 2020:01:01 12:00:00
[XMP-xmp]       CreateDate                      : 2020:01:01 12:00:00
[XMP-xmp]       ModifyDate                      : 2020:01:01 12:00:00


Photos.app can display the timezone when it is added as a custom preference to macOS Language & Region > Advanced... > Times > drag the Time Zone to the Medium length format. Photos.app 5.0 displays GPS timezone, if available.

- Matti

Phil Harvey

Again, I don't have time to read this in detail, but at some point I noticed a constraint that MacOS wouldn't let me set FileModifyDate to be before FileCreateDate.  I wonder if this is related to the effect you are seeing.  You can use the -v2 option when writing to see the order that ExifTool is updating these tags.

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

wywh

Quote from: Phil Harvey on July 03, 2020, 02:38:14 PM
You can use the -v2 option when writing to see the order that ExifTool is updating these tags.

Thanks for the note. The -v2 output was interesting but I'm afraid I could not solve my very minor remaining problem with it (i.e. for some reason in macOS FileCreateDate seems to move only forwards in time if it is combined with other date-related commands).

I have already successfully fixed my old movie dates but for the terminally interested, here goes my test with a simplified command with the -v2 switch:

The starting point with wrong metadata dates is as follows. The command does not give FileCreateDate so I typed it here from the Finder's Get Info -- is it possible to have also it in the output?

exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all 2002-0202-0202-02.m4v
[System]        FileCreateDate                  : 2001:01:01 01:01:01+02:00
[System]        FileModifyDate                  : 2001:01:01 01:01:01+02:00


A combined command fails to move FileCreateDate forwards in time:

exiftool -api QuickTimeUTC=1 '-CreateDate<filename' '-FileCreateDate<filename' '-FileModifyDate<filename' -m -P -overwrite_original_in_place -wm w -v2 2002-0202-0202-02.m4v
======== 2002-0202-0202-02.m4v
Setting new values from 2002-0202-0202-02.m4v
Writing PDF:CreateDate if tag exists
Writing MIE-Doc:CreateDate if tag exists
Writing PNG:CreateDate if tag exists
Writing PostScript:CreateDate if tag exists
Writing QuickTime:CreateDate if tag exists
Writing XMP-xmp:CreateDate if tag exists
Writing ExifIFD:CreateDate if tag exists
Writing File:FileCreateDate if tag exists
Writing File:FileModifyDate if tag exists
Rewriting 2002-0202-0202-02.m4v...
  FileType = MP4
  FileTypeExtension = MP4
  MIMEType = video/mp4
  Editing tags in: ExifIFD File ItemList MIE-Doc MOV Meta Movie PDF PNG PostScript QuickTime UserData XMP
  Creating tags in:
  Rewriting Movie
  Rewriting MovieHeader
    - MovieHeader:CreateDate = '3061148461'
    + MovieHeader:CreateDate = '3095452922'
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting UserData
  Rewriting Meta
  Rewriting ItemList
    + FileCreateDate = '02/02/2002 02:02:02'
    + FileModifyDate = '1012608122'
    + FileModifyDate = '1012608122'
    1 image files updated

   
exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all 2002-0202-0202-02.m4v
[System]        FileCreateDate                  : 2001:01:01 01:01:01+02:00
[System]        FileModifyDate                  : 2002:02:02 02:02:02+02:00


Moving the File*Date commands to the very beginning didn't help. But combined with "exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all file" it did work.

Separated with -execute it works also forwards:

exiftool -api QuickTimeUTC=1 '-CreateDate<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -common_args -m -P -overwrite_original_in_place -wm w -v2 2002-0202-0202-02.m4v
======== 2002-0202-0202-02.m4v
Setting new values from 2002-0202-0202-02.m4v
Writing PDF:CreateDate if tag exists
Writing MIE-Doc:CreateDate if tag exists
Writing PNG:CreateDate if tag exists
Writing PostScript:CreateDate if tag exists
Writing QuickTime:CreateDate if tag exists
Writing XMP-xmp:CreateDate if tag exists
Writing ExifIFD:CreateDate if tag exists
Rewriting 2002-0202-0202-02.m4v...
  FileType = MP4
  FileTypeExtension = MP4
  MIMEType = video/mp4
  Editing tags in: ExifIFD ItemList MIE-Doc MOV Meta Movie PDF PNG PostScript QuickTime UserData XMP
  Creating tags in:
  Rewriting Movie
  Rewriting MovieHeader
    - MovieHeader:CreateDate = '3061148461'
    + MovieHeader:CreateDate = '3095452922'
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting UserData
  Rewriting Meta
  Rewriting ItemList
    1 image files updated
======== 2002-0202-0202-02.m4v
Setting new values from 2002-0202-0202-02.m4v
Writing File:FileCreateDate if tag exists
Writing File:FileModifyDate if tag exists
    + FileModifyDate = '1012608122'
    + FileCreateDate = '02/02/2002 02:02:02'
    1 image files updated


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all 2002-0202-0202-02.m4v
[System]        FileCreateDate                  : 2002:02:02 02:02:02+02:00
[System]        FileModifyDate                  : 2002:02:02 02:02:02+02:00


The combined command moves FileCreateDate only backwards:

exiftool -api QuickTimeUTC=1 '-CreateDate<filename' '-FileCreateDate<filename' '-FileModifyDate<filename' -common_args -m -P -overwrite_original_in_place -wm w -v2 1988-0808-0808-08.m4v
======== 1988-0808-0808-08.m4v
Setting new values from 1988-0808-0808-08.m4v
Writing PDF:CreateDate if tag exists
Writing MIE-Doc:CreateDate if tag exists
Writing PNG:CreateDate if tag exists
Writing PostScript:CreateDate if tag exists
Writing QuickTime:CreateDate if tag exists
Writing XMP-xmp:CreateDate if tag exists
Writing ExifIFD:CreateDate if tag exists
Writing File:FileCreateDate if tag exists
Writing File:FileModifyDate if tag exists
Rewriting 1988-0808-0808-08.m4v...
  FileType = MP4
  FileTypeExtension = MP4
  MIMEType = video/mp4
  Editing tags in: ExifIFD File ItemList MIE-Doc MOV Meta Movie PDF PNG PostScript QuickTime UserData XMP
  Creating tags in:
  Rewriting Movie
  Rewriting MovieHeader
    - MovieHeader:CreateDate = '3061148461'
    + MovieHeader:CreateDate = '2669864888'
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting Track
  Rewriting TrackHeader
  Rewriting Media
  Rewriting MediaHeader
  Rewriting MediaInfo
  Rewriting DataInfo
  Rewriting DataRef
  Rewriting SampleTable
  Rewriting UserData
  Rewriting Meta
  Rewriting ItemList
    + FileCreateDate = '08/08/1988 08:08:08'
    + FileModifyDate = '587020088'
    + FileModifyDate = '587020088'
    1 image files updated


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all 1988-0808-0808-08.m4v
[System]        FileCreateDate                  : 1988:08:08 08:08:08+03:00
[System]        FileModifyDate                  : 1988:08:08 08:08:08+03:00


thanks,

- Matti

StarGeek

Quote from: wywh on July 07, 2020, 11:49:45 AM
The starting point with wrong metadata dates is as follows. The command does not give FileCreateDate so I typed it here from the Finder's Get Info -- is it possible to have also it in the output?

From the notes on FileCreateDate:
     On Mac, this tag is extracted only if it or the MacOS group is specifically requested or the RequestAll API option is set to 2 or higher
"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

wywh

Thanks for the info about how to get even more dates! RequestAll seems to more clearly show [MacOS] FileCreateDate:

exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all -api RequestAll=2 2002-0202-0202-02.m4v
[ExifTool]      Now                             : 2020:07:07 21:46:05+03:00
[System]        FileModifyDate                  : 2002:02:02 02:02:02+02:00
[System]        FileAccessDate                  : 2020:07:07 21:46:04+03:00
[System]        FileInodeChangeDate             : 2020:07:07 21:43:34+03:00
[MacOS]         FileCreateDate                  : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemContentCreationDate       : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemContentCreationDate_Ranking: 2002:02:02 02:00:00+02:00
[MacOS]         MDItemContentModificationDate   : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemDateAdded                 : 2020:07:07 21:22:40+03:00
[MacOS]         MDItemDateAdded_Ranking         : 2020:07:07 03:00:00+03:00
[MacOS]         MDItemFSContentChangeDate       : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemFSCreationDate            : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemInterestingDate_Ranking   : 2020:04:09 03:00:00+03:00
[MacOS]         MDItemLastUsedDate              : 2020:04:09 22:19:13+03:00
[MacOS]         MDItemUsedDates                 : 2020:04:09 00:00:00+03:00
[MacOS]         XAttrLastUsedDate               : 2020:04:09 19:19:13
[QuickTime]     CreateDate                      : 2002:02:02 02:02:02+02:00
[QuickTime]     ModifyDate                      : 2002:02:02 02:02:02+02:00
[Track1]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track1]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track1]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track1]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00
[Track2]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track2]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track2]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track2]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00
[Track3]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track3]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track3]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track3]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00
[Track4]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track4]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track4]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track4]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00


MDItemTags shows a similar list but without [MacOS] FileCreateDate:

exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all -api MDItemTags=1 2002-0202-0202-02.m4v
[System]        FileModifyDate                  : 2002:02:02 02:02:02+02:00
[System]        FileAccessDate                  : 2020:07:07 21:46:13+03:00
[System]        FileInodeChangeDate             : 2020:07:07 21:43:34+03:00
[MacOS]         MDItemContentCreationDate       : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemContentCreationDate_Ranking: 2002:02:02 02:00:00+02:00
[MacOS]         MDItemContentModificationDate   : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemDateAdded                 : 2020:07:07 21:22:40+03:00
[MacOS]         MDItemDateAdded_Ranking         : 2020:07:07 03:00:00+03:00
[MacOS]         MDItemFSContentChangeDate       : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemFSCreationDate            : 2002:02:02 02:02:02+02:00
[MacOS]         MDItemInterestingDate_Ranking   : 2020:04:09 03:00:00+03:00
[MacOS]         MDItemLastUsedDate              : 2020:04:09 22:19:13+03:00
[MacOS]         MDItemUsedDates                 : 2020:04:09 00:00:00+03:00
[QuickTime]     CreateDate                      : 2002:02:02 02:02:02+02:00
[QuickTime]     ModifyDate                      : 2002:02:02 02:02:02+02:00
[Track1]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track1]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track1]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track1]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00
[Track2]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track2]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track2]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track2]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00
[Track3]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track3]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track3]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track3]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00
[Track4]        TrackCreateDate                 : 2002:02:02 02:02:02+02:00
[Track4]        TrackModifyDate                 : 2002:02:02 02:02:02+02:00
[Track4]        MediaCreateDate                 : 2002:02:02 02:02:02+02:00
[Track4]        MediaModifyDate                 : 2002:02:02 02:02:02+02:00


- Matti

wywh

exiftool -ver 12.13 or later now adds time zone automatically to most string-based QuickTime date/time tags like 'Keys:CreationDate' and 'UserData:DateTimeOriginal'. Great! I could shorten that old filename-to-movie-dates command which  previously as a last  step grabbed the time zone from 'System:FileModifyDate' to those tags.

'UserData:DateTimeOriginal' and also 'QuickTime:CreateDate' and 'QuickTime:ModifyDate' could be omitted because they are all covered by the '-AllDates' shortcut. I still had to separate '-FileCreateDate<filename' with '-execute' because  it can only move backwards in time if it is combined with other commands.

exiftool -api QuickTimeUTC=1 '-AllDates<filename' '-Track*Date<filename' '-Media*Date<filename' '-Keys:CreationDate<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -common_args -m -P -overwrite_original_in_place -wm w .

Phil Harvey

Quote from: wywh on January 09, 2021, 05:39:43 AM
I still had to separate '-FileCreateDate<filename' with '-execute' because  it can only move backwards in time if it is combined with other commands.

Double post.  See here for discussion.

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