In windows, how does one use the doscommand to obtain the names of all files in a folder in batches? The following is a small Editor for you to operate.
1. Start --> Run --> Enter cmd and press enter to enter your path in the black box.
For example, f: \ 1 \ 2 \ 3 is input in the target path.
F: Press enter.
Cd \ 1 \ 2 \ 3 Press ENTER
2. Use tree or dir/w
Input: dir/w> c: \ temp.txt
3. Open my computer and access the C-root directory to view a temp.txt file. If it is a multi-level directory structure and you want to view the hidden file, try to enter:
Dir/w/a/s> c: \ temp.txt press ENTER
4. The specific operation project is as follows:
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: \ Documents ents and Settings \ Administrator> f:
F: \> cd perl
F: \ perl> dir/w> c: \ temp.txt
F: \ perl>
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: \ Documents ents and Settings \ Administrator> f:
F: \> cd perl
F: \ perl> dir/w> c: \ temp.txt
F: \ perl>
5. The result is as follows:
The volume in drive F is Trans
The serial number of the volume is 2009-9830
F: \ perl directory
[.]
[...]
A.csv
A. fasta
A. pl
B .csv
B. pl
C. pl
D. pl
D90.csv
DNA. maf
DNA .txt
E. pl
F.txt
G. pl
Join. pl
M. pl
[Magic.15012010]
Magic.15012010.tar.gz
Mokuaiceshichengshu. pl
N. pl
REBASE.txt
Result.csv
Result.txt
Result.xlsx
S288c_yjm789.snp
Sequence.txt
Sh. pl
Strawberry. gb
Strawberry1.gb
Test. pl
Yeast_set2.S288C.stampy.pe.recal.variants.filter.vcf
Yeast_set2.YJM789.stampy.pe.recal.variants.filter.vcf
[Save]
30 files, 270,744,642 bytes
4 directories, 7,031,603,200 available bytes
The volume in drive F is Trans
The serial number of the volume is 2009-9830
F: \ perl directory
[.]
[...]
A.csv
A. fasta
A. pl
B .csv
B. pl
C. pl
D. pl
D90.csv
DNA. maf
DNA .txt
E. pl
F.txt
G. pl
Join. pl
M. pl
[Magic.15012010]
Magic.15012010.tar.gz
Mokuaiceshichengshu. pl
N. pl
REBASE.txt
Result.csv
Result.txt
Result.xlsx
S288c_yjm789.snp
Sequence.txt
Sh. pl
Strawberry. gb
Strawberry1.gb
Test. pl
Yeast_set2.S288C.stampy.pe.recal.variants.filter.vcf
Yeast_set2.YJM789.stampy.pe.recal.variants.filter.vcf
[Save]
30 files, 270,744,642 bytes
4 directories, 7,031,603,200 available bytes
In linux, the operation is simpler:
You only need one command,
Ls> a.txt
Ls> a.txt
In this case, the result is output to the.txt file.