嗨,我在批处理中有一个大问题,说起来有点复杂,但我想出了解决它的方法,问题是我不知道如何批处理,如果在 C# 中我可以轻松完成,因为我是新手批量,下面是c#,你们能教我如何批量做吗?我谷歌了一整天,但找不到方法,提前致谢
ArrayList list = new ArrayList();
//let say variable "Filesx" consist of files count in one folder
for(int i = 0; i < Filesx; i++){
list.Add("file number : " + i);
}
Run Code Online (Sandbox Code Playgroud)
P/S:如果无法批量使用 arraylist,则单独使用 array 就可以了
首先是我的初学者.我想创建批处理文件来搜索特定文件夹(包括所有它的子文件夹)并复制其中的所有文件,除了那些文件名包含一些特定的字符串,这是我到目前为止
set now=fish
set logDirectory="C:\Users\paiseha\Desktop\bb\"
for /r %logDirectory% %%i IN (*%now%*.*) do (
rem copy process goes here
)
Run Code Online (Sandbox Code Playgroud)
假设我有3个文件
C:\Users\fareast\Desktop\bb\one.txt
C:\Users\fareast\Desktop\bb\twofishtwo.txt
C:\Users\fareast\Desktop\bb\three.txt
Run Code Online (Sandbox Code Playgroud)
所以我只想复制文件one.txt和three.txt,而是只复制第二个,我知道它因为*%now%*.*所以我怎么能把它反转它以反过来做,请帮助我,请提前谢谢