Answer to number 2- bad scotstef! bad scotstef! Did a perl monks search on dos file spaces and i think vroom had posted this a year ago. WOW rtfm worked. Sorry I should have done that earlier.
Answer to number 1- will work on it, just need to test which boxes i want to send to.
#!/usr/bin/perl -w use strict; use Net::FTP; #Written by Scott for the purpose of saving having #to manually copy over my bookmarks file from my laptop. #variables to define the server, username, #password, local bookmarks file, remote bookmarks file, #and the "ftp object"? my $server="hostname.com"; my $username="username"; my $password="password"; my $file= "c:\\Program Files\\Netscape\\Users\\default\\bookmark.htm"; my $bookmarks="/home/scott/.netscape/bookmarks.html"; my $ftp; #Create the connection $ftp=Net::FTP->new($server); #print statement- always like a lort of these so i know something #happenned, is happening etc print "Trying to log in\n"; #log in or Die- tells me i was unable to log in $ftp->login($username, $password) || die "Unable to log in: $!"; #see comment on print statements for below. print"Succesful log in\n"; #actually starting the xfer through a put statement putting local file +s over to #remote file name #Use Die to let me know i screwed up the xfer $ftp->put($file, $bookmarks) || die "Unable to upadate files"; #Quit nicely, or Die and quit forcefully $ftp->quit() || die "Unable to quit $!";
|
|---|