Government Security
Network Security Resources

Jump to content

Photo

I Want To Make A Batch File... I Need Your Help

- - - - - server
  • Please log in to reply
2 replies to this topic

#1 yehya eid

yehya eid

    Private

  • Members
  • 2 posts

Posted 13 June 2011 - 12:00 PM

I want to make a batch file that will connect to an ftp server,
and will give username & password and will cd to required folder...
then it will get filename...or send files.....

(can i make a .bat file for this work... ?)
i really want to make batch fore this work...my ftp account:Host : " ftp.server.com "port :" 21 "username : " yehya "password : " eid "...........................................................................................



#2 Exploter

Exploter

    Private

  • Members
  • 19 posts

Posted 13 June 2011 - 06:19 PM

I want to make a batch file that will connect to an ftp server,
and will give username & password and will cd to required folder...
then it will get filename...or send files.....

(can i make a .bat file for this work... ?)
i really want to make batch fore this work...my ftp account:Host : " ftp.server.com "port :" 21 "username : " yehya "password : " eid "...........................................................................................



Ftp scripting is not that hard at all, can be done with simple ftp script using windows buildin ftp client
example of ftp script file:

lcd c:\your\local\dir\over\here
open ftp.server.com
yehya
eid
cd YourRemoteDir
prompt
binary
get DownloadFileName
bye

You can use put for sending[replace with get].
or mput\mget for file names with masks like mget *.php
name the the file and run it with windows ftp client
ftp -s:Script.Here.txt

#3 yehya eid

yehya eid

    Private

  • Members
  • 2 posts

Posted 15 June 2011 - 12:33 AM

Thank you very much...........
I had found the answer for my question
the code :
--------------------------------------------------------------



@echo off
echo open ftp.server.com > z
echo username >> z
echo password>> z
echo BINARY >> z
echo bye >> z
ftp -i -s:z
cls
exit
--------------------------------------------------------------





Also tagged with one or more of these keywords: server