Each time that I download a youtube file (e.g. abc.mp4
), I immediately alter its date/time stamp by manually executing the following command in a bash terminal: touch -d "$(date)" "abc.mp4"
.
This works fine except when the file has an imbedded exclamation mark (e.g. ab!c.mp4
). Then, the following command malfunctions: touch -d "$(date)" "ab!c.mp4"
.
Experimenting, I tried: touch -d "$(date)" "ab\!c.mp4"
: no joy, the touch command created a new empty file with the name ab\!c.mp4
.
My kludgy solution has been to manually rename the youtube file, removing the exclamation mark from its name, and then executing the touch
command.
Is there a more elegant method that allows the exclamation mark to remain in the file name?