I'm trying to rename the file extensions of a collection .txt files while also preserving the timestamps. I first attempted to use Robocopy, but this tool can only copy files from one directory to another while preserving file timestamps (file extensions cannot be changed as far as I can tell). I used PowerRename, which makes file extension renaming easy, but it also modifies the timestamps of the renamed files.
Finally I used the Windows MOVE command to achieve this (as shown below):
MOVE "C:\Folder\Filename.txt" "C:\Folder\New_Filename.txt"
But I am having trouble doing this with file extensions (specifically renaming multiple files extensions). Because when I attempted to use this code example for my own needs, I came up with this:
Move-Item -Path C:\Users\Elon\Downloads\notes\*.txt -Destination C:\Users\Elon\Downloads\notes\*.md
This command responds with the error "Move-Item: Illegal characters in path" - I suspected this is because I used a wildcard on the destination bit maybe? Any help would be appreciated. Thanks everyone!