Thread View: comp.os.msdos.misc
4 messages
4 total messages
Started by Donald Erickson
Fri, 14 Jun 1996 00:00
Writing output of command "DIR" to a file
Author: Donald Erickson
Date: Fri, 14 Jun 1996 00:00
Date: Fri, 14 Jun 1996 00:00
34 lines
2007 bytes
2007 bytes
My previous question(s) in this newsgroup have gotten plenty of good answers which solved my problems; this may be the simplest question of all. I'm working with approximately 10,000 JPG and GIF files on a 1.2G hard drive as well as thousands more on floppies. In order to keep the quantity of filenames in a particular subdirectory under 1000 (the apparent limit of my version of PC TOOLS for some operations), I've separated them into subdirectories based on the first letter of the filename. So that I can avoid downloading duplicate and reposted files, I'd like to maintain the filenames along with size, date, and time in a database using Alpha 4 V. 4. There is no problem creating the database once I can get the list of files into a data file itself. Is there a simple way to redirect the output of the command DIR into a file? Or should I look to one of the shareware catalog programs to provide what I'm looking for? From there, I could easily generate the file to be imported into Alpha 4 but I thought there might be a quick and easy way to avoid that step. Thanks for your help. Donald Erickson erickson@csnsys.com ComStock Net, Rialto, California (909)877-6407 voice Unlimited 28.8 Internet access, $19.95/month.
Re: Writing output of command "DIR" to a file
Author: jyazel Jack Yazel
Date: Sat, 15 Jun 1996 00:00
Date: Sat, 15 Jun 1996 00:00
23 lines
1318 bytes
1318 bytes
Donald Erickson (erickson@csnsys.com) wrote:
(snip)
:
: There is no problem creating the database once I can get the
: list of files into a data file itself. Is there a simple
: way to redirect the output of the command DIR into a file?
(snip)
:
: Thanks for your help.
:
: Donald Erickson
: erickson@csnsys.com
:
: ComStock Net, Rialto, California (909)877-6407 voice
: Unlimited 28.8 Internet access, $19.95/month.
:
:
dir > fname.txt (change fname.txt to the name desired)
This creates an ascii file.
Re: Writing output of command "DIR" to a file
Author: Erik van Keimpema
Date: Tue, 18 Jun 1996 00:00
Date: Tue, 18 Jun 1996 00:00
16 lines
1445 bytes
1445 bytes
Dear Donald, Your question is one that is easily answerred. The most basic option to redirect the output of the DIR-command to a file is with the DOS redirect operators. Use the following command : dir <start of tree> /s > <filename for log> start of tree is the directory under which all the gif0files are located. filename for log is the place and name for the logfile. The /s option makes DOS recurse into all subdirectories. (this works for DOS-versions 5.0 and higher) There are other ways to do this but they are more complex. Erik van Keimpema Email: erik.keimpevankeimpema@icim.nl
Re: Writing output of command "DIR" to a file
Author: Manuel Gonzalez Martinez
Date: Fri, 28 Jun 1996 00:00
Date: Fri, 28 Jun 1996 00:00
60 lines
3314 bytes
3314 bytes
Donald Erickson (erickson@csnsys.com) wrote: > I'm working with approximately 10,000 JPG and GIF files on a > 1.2G hard drive as well as thousands more on floppies. In > order to keep the quantity of filenames in a particular > subdirectory under 1000 (the apparent limit of my version of > PC TOOLS for some operations), I've separated them into > subdirectories based on the first letter of the filename. > > So that I can avoid downloading duplicate and reposted > files, I'd like to maintain the filenames along with size, > date, and time in a database using Alpha 4 V. 4. > > There is no problem creating the database once I can get the > list of files into a data file itself. Is there a simple > way to redirect the output of the command DIR into a file? > Or should I look to one of the shareware catalog programs to > provide what I'm looking for? > Thanks for your help. Well you can use my BRiNDYS CAT utility (already available as as shareware program :) Just a simple dir *.jpg >redirect.txt will put in a text file all your directory, but using CAT: cat /E:g >redirect.txt will give you extra information, as the size, colors, and title of the program used to create each image. The /E:G parameter tells the program to only list Graphic files. Or if you want to avoid having duplicated files, use: cat /E:G /C /O:s And you will get a warning for every duplicated file in the directory (don't trust on date/time checking schemes, as many files with the same length and contents can easily have different dates). The /C uses the CRC-32 redundancy check to compare all files, and the /O:S sorts the listing as DIR does. Take a copy of CAT from: http://www.fiv.upv.es/alumnos/a2917347/cat_e.html ftp://ftp.simtel.net/pub/simtelnet/win3/diskfile/bscat260.zip ftp://garbo.uwasa.fi/pc/dirutil/bscat260.zip ftp://ftp.zetnet.co.uk/pub/fido/rar/BSCAT25E.RAR or use archie with "bscat" to get a mirrored file near you. Hope it helps. _______________________________________________________________________ | Manuel Gonzalez Martinez's | | _ _ _ _ E-mail: a2917347@finf.upv.es | | |_) |_) + |\ | | \ |__| (_` http://www.fiv.upv.es/alumnos/a2917347 ___| | |_) | \ | | \| |_/ ._,' ._) Mail: Avenida Peris y Valero, 122 - 7 | ,' | S O F T W A R E Valencia 46006. Spain, Europe. |,' `-------------------------------------------------------------------'
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads