xcopy command does not work in a batch file

6,706

The problem is the acute accent over o in Repositórios. This requires you to either save the batch file in a correct character encoding or by setting correct character encoding in the batch-file like the following:

chcp 1252
xcopy "D:\Desenvolvimento\Repositórios GIT\driverXD\app\*" driverxd\ /e

1252 references Windows 1252 which is the normal latin encoding.

Share:
6,706

Related videos on Youtube

FabianoLothor
Author by

FabianoLothor

Web Developer

Updated on September 18, 2022

Comments

  • FabianoLothor
    FabianoLothor over 1 year

    The command below works in CMD Prompt, but does not work in a batch file.

    xcopy "D:\Desenvolvimento\Repositórios GIT\driverXD\app\*" driverxd\ /e
    
    • Admin
      Admin over 9 years
      the destination is a relative path, maybe that could be the cause?
  • Diziet
    Diziet almost 7 years
    AGH, that spawns a new temporary shell, which is pretty undesirable in a for loop.