I use CMD to create a text file for a directory of directories (ie. 2014 Folder containing folders for each project that year).
Piping the DIR command to create a text file is very useful, but would love to automate the process as much as possible.
I import the text file into Excel to cull the data.
I am curious if there is a way to remove the Header and Footer (along with the folders named <.> and <..> b/c I'm not sure what they even are).
But would like to know if this is possible before the text file hits Excel.
I have come close with my current batch, but it leaves two blank rows at the top; which may not be a big deal, but I would like to know the best way possible.
*It seems this could be a very common situation, I just cannot find a specific batch w/o being to complex for my understanding.
**My current batch file uses this type of approach: DIR, REN (for whatever reason to modify the old file into a new one) and FINDSTR /V "Volume Directory .. bytes" dir01.txt.old > dir01.txt
TITLE Project Folders DIR S:\"Project Folder 2014\Projects" /T:C /O:-N > S:\MyFolder\dir01.txt DIR S:\"Project Folder 2014\Projects" /T:W /O:-N > S:\MyFolder\dir02.txt DIR S:\"Project Folder 2014\Projects" /T:A /O:-N > S:\MyFolder\dir03.txt S: CD MyFolder REN dir01.txt dir01.txt.old REN dir02.txt dir02.txt.old REN dir03.txt dir03.txt.old FINDSTR /V "Volume Directory .. bytes" dir01.txt.old > dir01.txt FINDSTR /V "Volume Directory .. bytes" dir02.txt.old > dir02.txt FINDSTR /V "Volume Directory .. bytes" dir03.txt.old > dir03.txt DEL dir01.txt.old dir02.txt.old dir03.txt.old PAUSE
The bare format will not be useful; as I use the date created, modified, and accessed in 3 separate text files to use for tracking the projects
Would this be easier to accomplish in PowerShell?