Using windows CMD/BAT, how would I be able to copy a file (an executable / .exe file in this case) to a new location if I don't no the ABSOLUTE location of the source file? I'm rather new to CMD and BAT files.
The specified file itself is dependant on the input of the user; therefore the path of said file is not specified in the code itself.
Ex. Copying MSpaint.exe (Located in C:\Windows\System32, although for the context of the question, we don't know that) to a desktop folder called PAINT.
I've tried using
copy "*\mspaint.exe" "C:\Users\User\Desktop\PAINT"
But the error statement says
The filename, directory name, or volume label syntax is incorrect.
0 files(s) copied.
I've tried using the command without the wildcard path, to no further avail.
copy "mspaint.exe" "C:\Users\User\Desktop\PAINT"
Any help would be much appreciated!