I posted a tcf version of doing this to Ben's archive
(http://www.pcforge.com/goodies/29.zip) the other day. It shows an
example of both the dos DIR command and a select box. It was written for
deletes, and I think for you Steve =).

The way dos commands work is quite simple:
1. you provide a command
2. you provide switches or arguments (for instance a file name or path)

     command  switches
--------------------------
c:\> dir      /B /O:N /A-D c:\test


In dos to pass an argument to a command you use variables (arguments)
like so:

C:\>set thisPath="c:\test\"
C:\>echo thisPath
Returns:
-----------
C:\test\

C:\>dir %thisPath%
Then returns:
-----------------------
Directory listing...blah blah

If we write a batch file that looks like this:

%command% %switches%

we need only to pass in those arguments from Tango for ANY dos based
command. You could put ONE batch file in a secure spot on your server
and use ONE tcf file to call ANY dos commands on ANY sites hosted on the
same server using this method. I'm sure there is a fancy way to do this
with a JavaBean, but Windows was written this way for a reason. Why slow
down your application using Java when there is already a simpler way to
do this (unless you just want to experiment). Granted if you provide a
form field for both %command% and %switches% you could someone format
your machine, but by using a tcf, you can specify what %command% is in
your method calls!

My advice would be for everyone on this list who hasn't experimented
with this to do so ASAP to avoid further hassles when dealing with such
things. I'd be happy to answer any questions or what have you. It's
really quite a simple and very useful way of manipulating your file
system. One thing I have done in the past, is use "ipconfig" and
<@locate> to determine the IP of the host in server to server
communications or a multiple server situation. Almost all DOS commands
will return @@resulset when they are called which is very valuable.

You could do batch processes on images, all kinds of nice stuff. Convert
stuff into PDFs?

Jake Stevens

Ps. Sorry if the last thing you wanted to read was a DOS tutorial =)
LOL. I've attached the tcf and batch file if you want to check it out.







-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Campbell, Steve V.
Sent: May 3, 2002 10:24 AM
To: Multiple recipients of list witango-talk
Subject: RE: Re: Witango-Talk: directory listing

I am interested to know and to hear more from what you mentioned here. I
have 
dir. listings and batch's running all over the place. I have changed
some out to .tcf's but I would really like to hear about your idea,
"simple JavaBean". I have never gotten into these and I would like to
hear more. Maybe off list? But probably there are others that can stand
to hear what you have to say.

Steve

-----Original Message-----
From: Mike Tyranski [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 9:15 AM
To: Multiple recipients of list witango-talk
Subject: Re: Witango-Talk: directory listing


You could also build a simple JavaBean to do it as well.  However, the
batch file is
probably the best for a quick solution.

Mike

John Newsom wrote:

> I am pumped about the rtf method of populating word documents with
databased
> data.  I am using it to populate student progress report forms.  Very
very
> slick.  Now I would like to automatically populate a drop down box
with the rtf
> files available in a particular directory.  I have searched the list
archives on
> the witango site, and the method proposed in one post was to write a
batch file
> that does a directory listing and then use the extrenal action to call
the batch
> file, and access the resultset.  I could use the choicelist tag then
to display
> the resultset as a drop down list.  Is this still the method of
choice?
>
> Also, my hard drive crashed, alas, and I have lost my  book marks to
the various
> list archives.  I have Ben's site, but the search doesn't seem to be
working.
> Also, the witango site.  But I thought there was another one with the
complete
> archives.  Can some one help?
>
> Thanks,
>
> John Newsom
>
>
________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to
[EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Attachment: external.tcf
Description: Binary data

Attachment: cmd.cmd
Description: Binary data

Reply via email to