AngelTouch Posted December 28, 2009 Posted December 28, 2009 hello every one before i posted here i searched alot to fined solution to my question but couldn't fined any thing that helps meso i wish you could help me $file = FileGetSize ($file0) $server = "ftp.members" $username = "user" $pass = "pass" $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, "D:\Program Files\TinaSoft\Easy Cafe Server\database\maindbex.DB", @HOUR &@MIN & @SEC ) $Ftpc = _FTPClose($Open) $file2 = FileGetSize ($file0) $server = "ftp.members" $username = "user" $pass = "pass" $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, "D:\Program Files\TinaSoft\Easy Cafe Server\database\maindbex.DB", @HOUR &@MIN & @SEC ) $Ftpc = _FTPClose($Open) exitit works fine and sends me 2 copies of DB to my ftp now my problem is that i want the second ftp get $server\$username\$pass from text (c:\id.txt)
jvanegmond Posted December 28, 2009 Posted December 28, 2009 Your code will be something like this psuedo code: $data = FileRead from C:\id.txt $split = StringSplit $data so you get the elements you want in an array $server = $split[...] $username = $split[...] $client = $split[...] With the help file in one hand, this example in the other, and your script in the other you will get the task done. github.com/jvanegmond
failedtocompile Posted December 28, 2009 Posted December 28, 2009 Your code will be something like this psuedo code: $data = FileRead from C:\id.txt $split = StringSplit $data so you get the elements you want in an array $server = $split[...] $username = $split[...] $client = $split[...] With the help file in one hand, this example in the other, and your script in the other you will get the task done. So your saying he has 3x hands?
jvanegmond Posted December 28, 2009 Posted December 28, 2009 Every good programmer has three hands, that's how they get their job done in time. It's not surprising so many projects are over budget and late. github.com/jvanegmond
AngelTouch Posted December 29, 2009 Author Posted December 29, 2009 i know that I'm supposed now to make it work but I'm afraid i can't .... plz could u make it in an easier way c:\id.txt have 3 lines ftp.member.online.com angeltears password i need it to be simple or something like this $file = FileGetSize ($file0) $server = FileReadLine("id.txt", 1) $username =FileReadLine("id.txt", 2) $pass = FileReadLine("id.txt", 3) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, "D:\Program Files\TinaSoft\Easy Cafe Server\database\maindbex.DB", @HOUR &@MIN & @SEC &@ComputerName ) $Ftpc = _FTPClose($Open) pregnancy is so hard and i have to stay home when I'm tired i want to manage work while I'm in bed
AngelTouch Posted December 30, 2009 Author Posted December 30, 2009 Your code will be something like this psuedo code: [ code='text' ] ( Popup ) $data = FileRead from C:\id.txt $split = StringSplit $data so you get the elements you want in an array $server = $split[...] $username = $split[...] $client = $split[...] With the help file in one hand, this example in the other, and your script in the other you will get the task done. or could u make it in real example cz i couldn't make splits to work i don't know what I'm doing wrong c:\id.txt have 3 lines ftp.member.online.com angeltears password
anzacfalcon Posted December 30, 2009 Posted December 30, 2009 or could u make it in real example cz i couldn't make splits to work i don't know what I'm doing wrong c:\id.txt have 3 lines ftp.member.online.com angeltears password Here is the code you need: $txtfile = FileOpen ( "C:\id.txt", 0 ) $server = FileReadLine($txtfile, 1) $username = FileReadLine($txtfile, 2) $pass = FileReadLine($txtfile, 3) FileClose($txtfile) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, "D:\Program Files\TinaSoft\Easy Cafe Server\database\maindbex.DB", @HOUR &@MIN & @SEC ) $Ftpc = _FTPClose($Open) I hope this helps, if you need anything with a GUI i will be more than happy to make you a much more advanced program since i enjoy coding in AutoIt.
AngelTouch Posted December 30, 2009 Author Posted December 30, 2009 Thanx a lot it worked 100% ur grate and thanx for all who helped
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now