The following lines allowed me to list all the files, folders, and sub-folders in file TXT, but the problem is that the hidden files are not included in file TXT. So, what do I have to do?
@echo off
set /a VAR=%random%
mkdir C:\Users\Blm\Desktop\folder\
for /r E:\ %%i in (*) do (echo %%i >> C:\Users\Blm\Desktop\folder\%VAR%.txt)
pause
Answer
Try replacing this line:
for /r E:\ %%i in (*) do (echo %%i >> C:\Users\Blm\Desktop\folder\%VAR%.txt)
With this one:
dir /s/o/b /a E:\ > C:\Users\Blm\Desktop\folder\%VAR%.txt
No comments:
Post a Comment