Telnet & windows

Y

yocoyote

I am using perl's Net:FTP in my script running on a windows xp box to
get files from a unix box. Works great. I've now found that I must
change directories on the unix box to get additional files. Since ftp
has no command to allow directory changes on the remote machine (at
least I can't find one), I am trying to incorporate telnet in a perl
script to change directories. I'd then ftp them over as usual I'm
using activestate perl 5.8.4 in a dos window, accessing a unix solaris
box. Activestate perl for windows does not come with Net:Telnet but
I've seen it on the web
(http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm) and
am thinking its only available on unix/linux (or non windows) boxes.

Does anyone know if a telnet module that can be used in the windows
environment.

thanks in advance,
Yocoyote
 
B

Brian Wakem

yocoyote said:
I am using perl's Net:FTP in my script running on a windows xp box to
get files from a unix box. Works great. I've now found that I must
change directories on the unix box to get additional files. Since ftp
has no command to allow directory changes on the remote machine (at
least I can't find one)


Have you read the documentation for Net::FTP?
 
Y

yocoyote

I did a lousy job of explaining what I wanted to do. I meant to say I
need a way go to the remote machine and determine the name of the
directory I need to move to (it varies depending on which unix machine
i'm going to). I do already use cwd to change directories. (obviously
contradicting one of my original statements). In my case the "489"
below (part of directory name 'u489') can be any number, depending on
which of the 500 machines i'm pulling the files from (i work in a
factory and the unix boxes control the chip making equipment).

So what I'm looking for a clever way to determine the directory name on
the box i'm pulling the files from.

use Net::FTP;

$ThisFTP = Net::FTP->new('xxx.yy.zzzz.com');
$ThisFTP->login('myusr','mypwd');
$ThisFTP->cwd('/home/sc/u489/log');
$ThisFTP->ascii;
$ThisFTP->get('mylogfile.log', 'my_mylogfile.log');
 
A

A. Sinan Unur

I did a lousy job of explaining what I wanted to do.

You can improve your posts by quoting some context.
I meant to say I need a way go to the remote machine and determine
the name of the directory I need to move to (it varies depending on
which unix machine i'm going to).

So, does each machine have a single u??? directory under /home/sc?
use Net::FTP;

use strict;
use warnings;

missing.
$ThisFTP = Net::FTP->new('xxx.yy.zzzz.com');
$ThisFTP->login('myusr','mypwd');
$ThisFTP->cwd('/home/sc/u489/log');

Why not first change to /home/sc, do an ls, and figure out the name of
the u??? directory from the listing, then cd to u???/log

Sinan
 
J

John W. Krahn

yocoyote said:
I did a lousy job of explaining what I wanted to do.

And of quoting any context.
I meant to say I
need a way go to the remote machine and determine the name of the
directory I need to move to (it varies depending on which unix machine
i'm going to).

Have you tried mounting the remote file systems via NFS?


John
 
Y

yocoyote

And of quoting any context.

Thanks for gently directing me to the etiquette for this news group.
I'm new and didn't take the time to read the FAQ, browse content for a
while, and in general post correctly. At any rate, I found all I
needed (the $ThisFTP->ls(/home/sc) will do it. thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top