Chdir problem

GCC Consulting gcc at optonline.net
Wed Sep 1 16:18:25 PDT 2004


Top post:

What I wanted to do is create a list of all of the customer directories in an
array.  The only other thing to remember is that the first 2 directories listed
will be . & .. So the first actual directory name will be in the 3rd position.

Using those names, check for the file 997.rpt and see if it had the current
date.

So, this is how directory structure for one customer would look

	c:/edata/Geis-A/macy/ANSI/997/all/997.rpt  (remember windows and fp will
translate the / to a \)
                      ^^^^
		     this name changes		 

Once I have that, I can check for the date of 997.rpt and if current, do a
system command to send the file to the printer. Then check the next customers
directory, etc.

Now, all this may be a moot point as I moved the laser printer from the server
to the XP workstation and remapped all of the other stations to the new
location.  I hope that with the printer connected locally to lpt1, I have solved
this problem and let the EDI software actually print the report(s).

I did play with this option somewhat. I will probably continue with the exercise
just to see if I can make it work.  Who knows I may need it again sometime. I
did use a listbox to display the initial directory search and with a little more
work could make it function just like filePro's, well almost.  

Richard Kreiss
GCC Consulting 


> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com 
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf 
> Of Fairlight
> Sent: Wednesday, September 01, 2004 6:35 PM
> To: filePro Mailing List
> Subject: Re: Chdir problem
> 
> At Wed, Sep 01, 2004 at 08:32:03AM -0400 or thereabouts, 
> suspect Kenneth Brody was observed uttering:
> > Fairlight wrote:
> > [...]
> > > You want to look at OPENDIR, NEXTDIR, CLOSEDIR, and 
> EXISTS with the 
> > > array @FSTAT[] in v5.x.  The first three are only 
> necessary if you 
> > > need to actually traverse directories.  If you just need 
> to peek at 
> > > that file in 8 locations, you could just use EXISTS and 
> check @FSTAT[].
> > [...]
> > 
> > FYI -
> > 
> > The opendir/nextdir/closedir/@dirlist[] combo includes the 
> > modification date and time, so in this case the 
> exists/@fstat[] combo is redundant.
> 
> Unless he wasn't needing to do full traversal.  He said he 
> needed to, but it seemed like there was one specific file he 
> knew would be there, in a speciic part of a heirarchy where 
> only one segment of a pathname changed.
> I'm thinking that a far easier way to do it would simply be 
> with exists/@fstat[] based on the contents of a lookup to 
> customer or company (I forget which, and it's been snipped) 
> names that have a field set that they should be checked for 
> the presence of that file.
> 
> I can't tell if it was a complete example, or a hypothetical 
> explanation.
> So I tried answering both ways.  But it didn't seem like 
> traversal was actually needed given the specific example.
> 
> ("He" being Richard throughout this post...no offense, I know 
> you're "sitting right here", Richard.  No disrespect intended.)  :)
> 
> mark->
> --
> Bring the web-enabling power of OneGate to -your- filePro 
> applications today!
> 
> Try the live filePro-based, OneGate-enabled demo at the following URL:
>                http://www2.onnik.com/~fairlite/flfssindex.html
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 




More information about the Filepro-list mailing list