in reply to Accessing files on a Windows server from *NIX via SMB

Why does the user need to FTP the files to the UNIX box? Can't your script just attach using Net::FTP and issue an ls, parsing the results?

I'm suggesting something like this (psuedo):

my @CSV_list = parse_csv_file('stupid_file.csv'); if (@CSV_list) { my $ftp = connect_and_login('remote.site.tld'); my @listing = parse_dir($ftp->ls('.')); compare_contrast(\@CSV_list, \@listing); }

At what point do any files need to be sent to the FTP server?

<-radiant.matrix->
Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law

Replies are listed 'Best First'.
Re^2: Accessing files on a Windows server from *NIX via SMB
by Bob9000 (Scribe) on Aug 22, 2005 at 16:59 UTC

    Why does the user need to FTP the files to the UNIX box?

    I'm not sure how that parse_csv_file sub is implemented, but I bet it'd appreciate actually having something to parse. :)

      Perhaps I misunderstood the OP, but it sounds to me like there is a CSV file in one location (local) and it must be compared with a directory structure on a remote machine.

      Even if I misunderstood that, I can't see where files are being sent (that is, pushed). Run the script wherever the CSV files exist, and use Net::FTP to deal with the listing. I still see no need for file transfer, here. Thus the request for clarification.

      <-radiant.matrix->
      Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
      The Code that can be seen is not the true Code
      "In any sufficiently large group of people, most are idiots" - Kaa's Law

        I read the OP as saying there are 3 computers involved. An XP file server, the users laptop, and a Solaris box. The current state is that a user must access the XP box with their laptop to FTP the file to the Solaris box. I belive the OP wants the Solaris box to pull the CSV file from the XP box via SMB. (I would assume the XP box does not have a FTP service running.)

        My only experiance using Samba is either sharing files from Linux or using smbmount (or mount with an appropriate -t setting) to access windows files. smbmount //host/share /mount/point has worked for me, but it prompts for username and password if needed. There should be command line options to set those if needed.