Sign in with
Sign up | Sign in
Your question

Redirect directory output to file

Last response: in Windows XP
Share
Anonymous
June 7, 2005 9:16:19 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

I would like to redirect a listing of directories to a file that I can then
import into Excel. I have multiple directories of image files and need to
back them up to a DVD. I also need to track which directories I have backed
up and which still need to be backed up. I thought that if I could redirect
the list of directories to an excel file, this would make an easy tracking
mechanism for me.

Any help on how to do this would be greatly appreciated.

TIA

Earl
Anonymous
June 8, 2005 4:30:27 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

from my DIR.bat

echo
DIR /O:D /S >DIR.TXT
rem TYPE DIR.TXT


"wojo2" <wojo2@discussions.microsoft.com> wrote in message
news:D 611CE62-F727-48C0-8442-EDF04DA4514B@microsoft.com...
>I would like to redirect a listing of directories to a file that I can then
> import into Excel. I have multiple directories of image files and need to
> back them up to a DVD. I also need to track which directories I have
> backed
> up and which still need to be backed up. I thought that if I could
> redirect
> the list of directories to an excel file, this would make an easy tracking
> mechanism for me.
>
> Any help on how to do this would be greatly appreciated.
>
> TIA
>
> Earl
May 23, 2012 4:15:17 PM

Quote:
from my DIR.bat

echo
DIR /O:D /S >DIR.TXT
rem TYPE DIR.TXT


If you append /W to that command it will give you the "wide" directory listing. In this case it will print just the file names without the size or time and sorted in filename order but will give you a file summary at the bottom (number of files and total size). The command would be:

DIR /O:D /S/W >DIR.TXT

which would output a file to the current directory called DIR.TXT that would contain your directory listing with just filenames (plus the summary) which would probably work better if you are trying to automate your backup system.
Related resources
!