简体   繁体   English

希伯来文件夹上的批处理文件

[英]Batch file on hebrew folders

I am trying to run a file on some folders whose names may contain hebrew characters and numbers. 我试图在一些名字可能包含希伯来字符和数字的文件夹上运行文件。

I have a .bat file that copies files from and to the folders: if the folders have English letters or digits it runs great. 我有一个.bat文件,用于从文件夹复制文件到文件夹:如果文件夹有英文字母或数字,则运行良好。

After I added the chcp 1255 to my script now it also works on hebrew folders, but it doesnt work if it also have digits in it (see screenshots). 现在我将chcp 1255添加到我的脚本后它也适用于希伯来语文件夹,但如果它也有数字,它就不起作用(见截图)。 there are files that i need to copy to the folders so in this example i gave myfile1.txt that i want to copy to all folders just for reference i have this folder תקיה 1321321535 and the script is 有文件,我需要复制到文件夹所以在这个例子中,我给myfile1.txt ,我想复制到所有文件夹只是为了参考我有这个文件夹תקיה 1321321535 ,脚本是

for /d %%a in (C:\Test\*) do copy /y C:\myfile1.txt %%a\

so it copy to all folders except the Hebrew folder. 所以它复制到除希伯来文件夹之外的所有文件夹。 Anyone can solve this? 谁能解决这个问题?

[ [ 在此输入图像描述 ] [ ] [[ 在此输入图像描述 ] ]

now it doesnt show ???? 现在它没有显示???? when using dir /b cause i added Hebrew fonts but still doesnt copy the file 当使用dir /b我添加了希伯来语字体,但仍然没有复制文件 在此输入图像描述

Missing double quotes (destination folder contains a space). 缺少双引号(目标文件夹包含空格)。 Read Escape Characters, Delimiters and Quotes : 阅读转义字符,分隔符和引号

d:\bat> pushd "D:\test\Unicode\תקיה"

D:\test\Unicode\תקיה> for /D %a in (*) do @echo %a
12323
תקיה 1321321535

D:\test\Unicode\תקיה> for /D %a in (*) do copy /y 01.txt %a\

D:\test\Unicode\תקיה> copy /y 01.txt 12323\
        1 file(s) copied.

D:\test\Unicode\תקיה> copy /y 01.txt תקיה 1321321535\
The syntax of the command is incorrect.

D:\test\Unicode\תקיה> for /D %a in (*) do copy /y 01.txt "%a\"

D:\test\Unicode\תקיה> copy /y 01.txt "12323\"
        1 file(s) copied.

D:\test\Unicode\תקיה> copy /y 01.txt "תקיה 1321321535\"
        1 file(s) copied.

D:\test\Unicode\תקיה>

Of course, in a batch script, double % percent sign as follows: 当然,在一个批处理脚本,双击%百分号如下:

for /D %%a in (*) do copy /y 01.txt "%%a\"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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