xcopy returns error “Invalid number of parameters” when exclude parameter is set

XCOPY is an old command harking back to the days of DOS. It looks like the /EXCLUDE option was never updated to support long file names. Ugh 🙁 If you remove the quotes, then the text after the space is interpreted as an additional parameter, and you get the “Invalid number of parameters” error. If … Read more

“if not exist” command in batch file

You have it almost done. The logic is correct, just some little changes. This code checks for the existence of the folder (see the ending backslash, just to differentiate a folder from a file with the same name). If it does not exist then it is created and creation status is checked. If a file … Read more