Re: [Dev-C++] reading and comparing filenames
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: jose i. c. <ji...@ci...> - 2005-02-25 15:52:23
|
reading and comparing filenames
Yeah, sounds simple enough. :-) I don't know what you want us to help =
you with. But, I would tell you, that I have done something like this, =
but I used the DOS command DIR (HELP DIR) to get my listings and pipe it =
to a file (DIR /options > filenames.txt). It was easier since the dir =
command has many options for sorting, so you could get the list that you =
want and have the files be in the right order etc. So, you could do a) =
and b) in one command. (Of course, depending what you really want in a) =
and in b).) You could even run a few commands with a few files as input =
and then execute c) with the input gathered from a) and b). Just a =
thought...
jos=E9
----- Original Message -----=20
From: Guillermo Gutierrez=20
To: dev...@li...=20
Sent: Thursday, February 24, 2005 7:53 PM
Subject: [Dev-C++] reading and comparing filenames
I have a bit of a dilemma, I have an app that copies files from one =
folder to another.=20
Now I need to copy different files from a second folder but I dont =
want to get all of them.=20
As newer versions of these files are created, the previous versions =
are renamed to "filename.****.bpl" as opposed to "filename.bpl".
the "****" is a four digit number representing the file time from the =
timestamp. I want to copy only the newer files (filename.bpl) and not =
the previous ones (filename.****.bpl).=20
What would be the best way to:=20
a) get a list of the filenames.=20
b) filter down to a list of the newer filenames (w/o the =
".****")=20
c) and finally copy only the ones on the filtered list.=20
Guillermo Gutierrez=20
Market Scan Information Systems=20
Software Q.A. Supervisor=20
(818) 575-2000 x2427=20
ggu...@ma...=20
|