Redirect directory output to file

G

Guest

Guest
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
 
G

Guest

Guest
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:D611CE62-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
 

Southerner

Distinguished
Apr 15, 2009
2
0
18,510
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.