-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist_files.bat
38 lines (34 loc) · 861 Bytes
/
list_files.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
setlocal enabledelayedexpansion
REM Output file name
set "output_file=file_list.txt"
REM Function to print directory tree and files with dynamic headers
:print_directory_tree
(
echo Date and Time: %date% %time:~0,8%
echo Directory Structure and Files in .\app:
tree /F .\app
echo.
echo Details of Files:
for /r .\app %%f in (*) do (
set "file=%%f"
for %%b in ("!file!") do (
set "ext=%%~xb"
if /I not "!ext!"==".exe" (
if /I not "!ext!"==".dll" (
echo ___________
echo Start of file: !file!
type "!file!"
echo End of file: !file!
echo ___________
) else (
echo Binary File: !file!
)
) else (
echo Binary File: !file!
)
)
)
) > "%output_file%"
echo Script finished. Output saved to %output_file%
exit /b