简体   繁体   中英

How Do I COPY a file with special characters in the filename in a .BAT file?

I am generating a .BAT file containing nothing but COPY commands to move some files around.

Here is an example working command:

COPY "C:\TEST.PDF" "D:\TEST.PDF"

Here is an example that isn't working:

COPY "C:\édf.pdf" "D:\édf.pdf"

Can I copy this file using a windows batch file? Or do I have to rewrite my script in a language like PERL?

The examples I gave do work. I noticed that inside my .BAT file those special characters were getting lost because of the .BAT file's encoding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM