Copy the codeThe code is as follows:
for /r d:\wwwroot\web\\ %i in (*.asp) do @echo %i >>c:\windows\temp\
It is to list all the asp files in the d:\wwwroot\web\ directory and save them in c:\windows\temp\
================================ Gorgeous dividing line======================================
Copy the codeThe code is as follows:
for /d %i in (d:\wwwroot\web\*) do @echo %i
This sentence shows all files, including folders under d:\wwwroot\web.
================================ Gorgeous dividing line=====================================
Copy the codeThe code is as follows:
for /r d:\wwwroot\web\ %i in (*.*) do @echo %i >>d:\wwwroot\web1\
*.* under DOS means everything
That is to say, display d:\wwwroot\web1\all files, and then save them in d:\wwwroot\web1\
*.* is any suffix name. If changed to (*.exe), the directory and all EXE files in the following subdirectories will be listed.
================================ Gorgeous dividing line======================================
Copy the codeThe code is as follows:
for /f %c in (d:\wwwroot\web\) do @echo %c
View file content
================================ Gorgeous dividing line=====================================
Copy the codeThe code is as follows:
for /d %i in (???) do @echo %i
Type out the name of the folder under the current path with only 1-3 letters
================================ Gorgeous dividing line======================================
Copy the codeThe code is as follows:
type F:\VIP\qq1369\database\# echo >>c:\windows\temp\
Read the other party's database configuration file through for or type, but the database has modified the suffix name, for example, as .resx
To prevent us from downloading, use the type command to copy the database to c:\windows\temp\ and then download it!
================================ Gorgeous dividing line=====================================
Copy the codeThe code is as follows:
for /r F:\\ %i in (*) do @echo %i
List all files under F:\\ directory
================================ Gorgeous dividing line======================================
Copy the codeThe code is as follows:
for /r d:\ %i in () do @echo %i
Use this command to search for the directory where the picture is located under D:\.
Excerpt from Stinky Socks blog