Apparently I don't know how to write a copy batch file anymore?

I’m doing a bunch of modding and the right click copy, alt-tab, swap to another folder right click paste, “yes” I do want to overwrite destination files.

I wrote this in Notepad with a .bat extension and it does some quick blink and then done. But it’s not copying anything over:

xcopy C:\Users\jpina\AppData\Roaming\Paradox Interactive\Age of Wonders 4\Mods\Better Cameras & Beautiful Vistas*.* C:\Users\jpina\OneDrive\Documents\Paradox Interactive\Age of Wonders 4\Mods\Better Cameras & Beautiful Vistas*.* /f /e /-y

Got my info from here:

Maybe Xcopy can’t do long folder names with spaces?

If not, how would I do this?

Anything on a DOS command line needs quotation marks around the entire path if it contains spaces. Bonus tip: after you type xcopy and start typing the path, hit the tab key to have it autocomplete.

Just so I make sure I got this all right.
I created a file called: CopyAoWMod1.bat

and then the rest would be this?

xcopy “C:\Users\jpina\AppData\Roaming\Paradox Interactive\Age of Wonders 4\Mods\Better Cameras & Beautiful Vistas*." "C:\Users\jpina\OneDrive\Documents\Paradox Interactive\Age of Wonders 4\Mods\Better Cameras & Beautiful Vistas.*” /f /e /-y

Yea, it worked perfect! Thank you thank you thank you.

FYI:

Here’s the code it made:
xcopy "C:\Users\jpina\AppData\Roaming\Paradox Interactive\Age of Wonders 4\Mods\Better Cameras & Beautiful Vistas\*.*" "C:\Users\jpina\OneDrive\Documents\Paradox Interactive\Age of Wonders 4\Mods\Better Cameras & Beautiful Vistas\" /s /e /-y

ChatGPT is perfect for this kind of thing.

Learn to use the Tab key it did wonders. Or move up to Power Shell.

Wow. I had no idea ChatGPT could be used for that. That’s really cool.

ChatGPT, CoPilot and other coding assistants tend to be excellent at rigorous syntax like batch files, Cron jobs (schedule tasks in the Unix world), regex expressions (validate strings or replace characters), …

Machines understand how that stuff works and the syntax quite well

If you want to copy files from a to b, you can simply ask ChatGPT: "how do I use xcopy to copy files from a to b (where a and b are your directories)? "

It would have given you the command.

It also tends to be pretty good at languages like Python (if you ever want to ask it to read a CSV or text file file and do some processing on the data, it will likely get quite close to what you want).

Similarly, as shown above, it will happily diagnose issues with code. “Why doesn’t this work?” is definitely a good question to ask an assistant, especially for that kind of well documented syntax.

It’s worth playing around with. Quite fun / useful.