I'm studying today windows Under the system bat script , You want to traverse a directory and output the details of all the files in that directory . After a lot of search and exploration , This can be done with the following code :
@echo off set source_dir="C:\Users\leon\Desktop\test" for /R %source_dir% %%f
in(*.*) do ( echo Full path information : %%f echo Directory information : %%~dpf echo File prefix name : %%~nf echo
File suffix name :%%~xf echo Full file name : %%~nxf echo Path without suffix : %%~dpnf echo File modification time : %%~tf echo
File content size :%%~zf Byte ) pause
The results are as follows :

Full path information : C:\Users\leon\Desktop\test\test.txt
Directory information : C:\Users\leon\Desktop\test
File prefix name : test
File suffix name : .txt
Full file name : test.txt
Path without suffix : C:\Users\leon\Desktop\test\test
File modification time : 2020/07/09 14:58
File content size : 12 Byte
Please press any key to continue . .

If you just list a certain type of file ( such as *.doc), Then change it to the following statement :
@echo off set source_dir="C:\Users\leon\Desktop\test" for /R %source_dir% %%f
in(*.doc) do ( echo Full path information : %%f echo Directory information : %%~dpf echo File prefix name : %%~nf echo
File suffix name :%%~xf echo Full file name : %%~nxf echo Path without suffix : %%~dpnf echo File modification time : %%~tf echo
File content size :%%~zf Byte ) pause

Technology
©2019-2020 Toolsou All rights reserved,
Final review of database : Summary of comprehensive application questions use Python Make simple games Laplance operator ( Second derivative ) Convert hard disk to GPT Partition format Python Implementation of Hanoi Tower code about String How to create objects vue3 Learning journey 1—— establish vue3 project java String from back to front _Java String String summary use Python Write a story about plants versus zombies 【 Greedy Algorithm 】 Huffman coding problem