Hello Dean,
Coming from someone who has just deleted all of their files, your message seems remarkably composed and rational - kudos.
Unfortunately, regarding the recovery of your files, I can't improve on the AI generated answer.
As to why this happened, we have to consider how and when "environment variable" (such as %TEMP%) expansion/substitution occurs and whether you inadvertently made any typing mistakes (perhaps just a "fat finger" pressing of two keys).
An article from the reliable Raymond Chen discusses environment variable expansion. If %TEMP% expands to "C:\trailingspace " then the command "dir %TEMP%*" expands to "dir C:\trailingspace \*" which will list the contents of the directory "C:\trailingspace" (if it exists) and "\".
A "space" character, either in the environment variable expansion or inadvertently typing was probably your undoing.
Assuming that the volume containing the files is in NTFS format, use of the command "fsutil usn readJournal" will show what has been deleted (inasmuch as the volume journal is large enough to hold all of the file delete records).
Gary