Package List Content

I need a bat file that will list all the contents of a folder, including its subfolders in a text file.

one of our software stitches is constantly missing or adding files. The list will help me identify the problem (s).

+3
source share
3 answers

Wasn’t it?

dir C: \ autocad / s / b> output.txt

+3
source

If you have PowerShell, you can use this instead:

cd *<targetdirectory>*
ls -r |% { $_.FullName } | Set-Content foldercontents.txt

I will only raise it, because then you can compare the next time you check the differences:

$original = Get-Content foldercontents.txt;
$now = ls -r |% { $_.FullName }
Write-Host "Missing Files:";
$original |? { -not $($now -contains $_) };
Write-Host "Added Files:";
$now |? { -not $($original -contains $_) };
+1
source

, , , Sysinternals Process Monitor http://technet.microsoft.com/en-us/sysinternals/bb896645. , .

0

All Articles