| 1. |
Solve : ftp & batch help? |
|
Answer» First off all i want to say sorry if i openeded anyone in my lastpost and it wont happen again i didnt mean to complain when no one didnt reply. @echo off This sript is what i am looking for thank you. The only thing i donot know is what lines to put in the ftp.txt file if my username was website.com and password was password would i put this in 2 seprate lines in the text? soryr to sound dumbQuote First off all i want to say sorry if i openeded anyone in my lastpost and it wont happen again i didnt mean to complain when no one didnt reply. I seem to have missed that. What did you write? I did a search but I couldn't find anything. The FTP.TXT file is created from the batch file. So you just need to fill in these 3 values in the batch file: 1) echo user myuserid>ftp.txt 2) echo mypassword>>ftp.txt 3) ftp -s:ftp.txt mysite.com 1) will contain the username (REPLACE "myuserid") 2) will contain the password (replace "mypassword") 3) will contain the FTP host that you are logging into (replace "mysite.com")to have more control of your FTP process, you can use more suitable tools like Perl, Python etc... here's a perl example Code: [Select] use Net::FTP; chdir "c:\"; $ftp = Net::FTP->new("some.ftpserver.com", Debug => 1); $ftp->login("user",'password'); $ftp->cwd("/somedir"); while (<*.html>) { $ftp->put($_); } while ( <*.doc> ) { $ftp->put($_); } while (<*.pdf> ){ $ftp->put($_); } $ftp->quit; ghostdog74how would i compile and run a script like that in perl?. ghostdog74 I just was being sarcastic in my other post when no one replied after so many hours. It was wrong of me. I want to program i just get frustrated when it doesn't work out i spend ages on a code run it and get a errorr message but i guess you cant PICK programing up overnight.Quote from: kentguy07 on June 15, 2007, 02:32:29 PM I just was being sarcastic in my other post when no one replied after so many hours. Don't do it. Let me put that another way. DON'T DO IT. It's forum suicide. Nothing on earth makes a person look a bigger dork than bitching about not getting (free!) help quick enough, especially after a period of time measured only in hours. Also plenty of people who could help you will change their minds as a result. Quote from: kentguy07 on June 15, 2007, 02:32:29 PM ghostdog74how would i compile and run a script like that in perl?.you can save it as somefilename.pl , and run it from the perl interpreter on the command prompt, type perl somefilename.pl. However, since you don't really know perl yet judging from your reply, you can try and use what Gary has posted (the batch one) first. Quote ghostdog74 I just was being sarcastic in my other post when no one replied after so many hours.there are a few reasons why people don't reply. Ambiguous questions. Questions not easily understood. Or indeed no one knows the answer etc etc. So its EITHER you wait and see, or try to describe you problems in more DETAIL, like providing more examples etc etc. Or else at last resort you can try asking at other forums. lastly, patience is a virtue. Quote It was wrong of me. I want to program i just get frustrated when it doesn't work out i spend ages on a code run it and get a errorr message but i guess you cant pick programing up overnight.you are RIGHT. it takes practice. |
|