title: How can I work with Japanese characters in filenames on the Windows command line and in batch scripts?
body: <p>I am working on a Japanese version of Windows 7, in a Japanese environment and unfortunately many of the file and folder names I need to work with use Japanese characters.</p>
  
  <p>For example, I have this line in a .bat file:</p>
  
  <pre><code>xcopy * "C:\blahblah\動作確認\" /E /R /K /Y /I 
  </code></pre>
  
  <p>However, inside the C:\blahblah\ folder, this is the name of the folder I get:
     C:\blahblah\蜍穂ｽ懃｢ｺ隱構</p>
  
  <p>The problem is that 動作確認 has been transformed into 蜍穂ｽ懃｢ｺ隱構. The latter, while it uses Asian characters (and punctuation) is meaningless gibberish, and not even all of them Japanese characters.</p>
  
  <p>I researched this problem and I found that many people using English localizations of Windows have an issue where they see question marks instead of Japanese characters. That's not what happens for me using my Japanese localization of Windows - if I launch cmd and navigate to the parent of the source folder from which I want to copy, run <code>dir</code> and get this output:</p>
  
  <pre><code>2014/02/07  16:36    &lt;DIR&gt;          蜍穂ｽ懃｢ｺ隱構
  </code></pre>
  
  <p>This is the gibberish, not the actual Japanese.</p>
  
  <p>So what do I have to do to make my xcopy command inside my batch file work?</p>