Chdir problem

GCC Consulting gcc at optonline.net
Tue Aug 31 22:10:25 PDT 2004


 

> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com 
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf 
> Of Bill Vermillion
> Sent: Tuesday, August 31, 2004 11:13 PM
> To: filePro List
> Subject: Re: Chdir problem
> 
> As GCC Consulting was scratching "For a good prime call
> 391581 * 2^216193 -1" on the wall, he suddenly said:
> 
> >  
> > 
> > > -----Original Message-----
> > > From: filepro-list-bounces at lists.celestial.com
> > > [mailto:filepro-list-bounces at lists.celestial.com] On Behalf Of 
> > > Fairlight
> > > Sent: Tuesday, August 31, 2004 8:21 PM
> > > To: Filepro 2 List
> > > Subject: Re: Chdir problem
> 
> > > Yo, homey, in case you don' be listenin', GCC Consulting 
> done said:
> 
> > > > What I would like to do is have use filePro 's system 
> command to 
> > > > print this report.
> 
> > > > Sounds simple however this is a functional acknowledgement from 
> > > > there customers and each acknowledgement is located in 
> a different 
> > > > directory. It looks something like this:
> 
> > > > C:\edate\GEIS-A\customer_name\ANSI\997\all\997.rpt
> 
> > > > The variable here is the customer name and the date of the file 
> > > > 997.rpt
> 
> > > > I need to search each customer directory, get the name and if 
> > > > 997.rpt's date is equal to today's date, store the 
> directory name 
> > > > in an array. Once I have all of the positives, I would the loop 
> > > > through the array appending the name into the command 
> an printing 
> > > > the report.
> 
> > > > Any suggestions on how to best accomplish this will be greatly 
> > > > appreciated.
> 
> > > Are you trying to do all this in fP, or use an external?
> 
> > Since the EDI program( not fp) which generates the 977.rpt 
> ASCII file 
> > isn't printing it correctly, I want use fp to "walk"
> > thru each directory and using the system command, print the report.
> 
> > There are at least 8 possible edi customer directories 
> which have to 
> > be checked for a current 997.rpt file.
> 
> > > I mean, if you have a report and simply need to print a 
> report for 
> > > any customer name whose 997.rpt is of today's date, this is 
> > > something that's trivial to do in perl, and you could 
> just execute 
> > > *report from inside there.  Unless they did something really cool 
> > > with time and date as far as handling files (I remember Ken 
> > > mentioning some @STAT array or something very similar, though I 
> > > forget when it's populated) that might have this info, 
> it's going to 
> > > be a PITA to obtain and convert that internally to 
> anything useful.
> > > 
> > > What you're trying to do could be done as a cron job, 
> system call, 
> > > or whatever, with a tiny little perl program doing the 
> grunt work.  
> > > Not hard.
> 
> > Can't use cron as this is a Windows system. I can have the 
> EDI program 
> > initiate the batch file to run this program.
> 
> I will not accept 'This is a Windows system" as an excuse for 
> not running cron. Go ahead an run cron. And you can run most 
> of the other unix programs you are used to. You' sed, awk, 
> perl, tr, cut, tar, cpio, gawk, gcc, g++. You get things such 
> as ps, kill, xterm, ftp and even sendmail. For an editor you 
> can use vim.
> 
> All that of course is assuming your Windows is a fairly 
> recent Windows system.  You did NOT mention the version of 
> Windows and that's just as important as mentioning the 
> versions of Unix.
> 
> If it's Windows 2000, Windows 2003, or Windows XP, go to the 
> MS site and download the >FREE< SFU 3.5.  SFU - Services For Unix.
> 
> When you drop into the ksh you could easily think you are in 
> a Unix system.  Almost all the commands you want are there - 
> about 250 of them - the 'ls' commands work just like Unix.  
> So does piping things through 'less'.
> 
> If someone brought that up in full-screen mode and the user 
> was not a heavy Unix user, they might not be able to tell the 
> different.  It's not small at 238MB, but it surely makes
> some things easy.   You can even see your disk drives
> in the /dev directory.
> 
> > > Probably not the way you'd like to do it, but it's how 
> -I- would do 
> > > it, given the same problem--assuming I understand it fully.
> > Also, I would prefer to stay with fp and the programs available 
> > without installing another program.
> 
> SFU is a lot of programs.  But it may be just the tool you 
> need to do unix-like things in the MS world.

I have these programs.  However, as I said, I want to use only fp and not add in
any additional programs.  I can use windows task scheduler to start programs as
I presently do.  I have some jobs that run at night or early in the AM.

The server is still NT 4.0 and the other computer running EDI, when necessary is
a Win98 machine which isn't having this problem.

Richard Kreiss
GCC Consulting 




More information about the Filepro-list mailing list