Reputation: 616
I trying to copy from on file to another using a batch file, however i get the error in valid path.
SET DatabaseBackupPath=C:\Program Files\Microsoft SQL Server\MSSQL12.DBNAME\MSSQL\Backup
SET NewDatabaseBackupPath=C:\Users\USERNAME\Documents
xcopy "%DatabaseBackupPath%\%NewestFile%" "%NewDatabaseBackupPath%"
This is the ouput for %NewDatabaseBackupPath%
= "ÔǬÔǬC:\Users\USERNAME\Documents"
Can someone explain why all these characters exist and a possible solution?
Upvotes: 0
Views: 525
Reputation: 30093
There is doubled harmful character [U+202A]
in line SET NewDatabaseBackupPath=…
and its UTF-8 representation 0xE280AA
i.e. decimal sequence 226
, 128
, 170
is the same as that ÔǬ
string in OEM code pages
CP850 US & Western Eu
CP852 Central Europe
CP857 Turkic
Try Alt+226, Alt+128. Alt+170 in an open cmd
window or check using my Alt KeyCode Finder script
Picture taken from Google Chrome Extension Unicode Analyzer
Upvotes: 1