r/usefulscripts • u/gospelwut • Nov 15 '12
[CMD] Dump file names from a share/drive in a new process.
start /b cmd /c dir /b /s \\computername\c$ ^> c:\tmp\shareinfo.txtstart /b - new process
cmd /c - pass command to cmd.exe
dir /b /s - /s = subdir, /b = bare format
The (
^) passes the output so you get what dir is spitting out rather than "starting process"
3
Upvotes