melf Posted May 30, 2006 Share Posted May 30, 2006 (edited) Hi Im having serious problems sending a file.. All i want the autoit script to do is send the only file that will be dumped in a specific directory ( in this case a .ini file named by the players account info..example : peter-pan.ini )..so since the file will never have the same name i havent found how to the tell the script to upload *.*.ini file.. So what i tryed was to tell my first program to write down in name.txt file the name of the .ini to be sent and afterwards execute the autoit script..the autoit script goes like this #include <FTP.au3> $lecture = FileOpen("C:\Imladris Database\Reception\name.txt", 1) $filetitre = FileReadLine($lecture , 1) $blabla = '\Reception\' $blabla2 = $blabla & $filetitre $server = 'ftp.somewhere.com' $username = '****' $pass = '****' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\Imladris Database\Reception\fiche.ini', $blabla2) $Ftpc = _FTPClose($Open) at the other end on the ftp i get a file named "4" can anyone help me out here please..how can i tell the script to send to the ftp the only file that will be dumped in the directory "reception" and name it the same thing at the other end.. Edited May 30, 2006 by melf Link to comment Share on other sites More sharing options...
Rick Posted May 30, 2006 Share Posted May 30, 2006 (edited) $blabla = '\Reception\' should be '/Reception/' and if /Reception doesnt exist then _FTPMakeDir($conn, ???? , "/Reception" & ".ini") ;?? ummm thinking about it, what is it your expecting it save on the ftpsite again?? Edited May 30, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
melf Posted May 30, 2006 Author Share Posted May 30, 2006 (edited) i want to send a player named ini file to the ftp folder "reception" example : peter-pan.ini on the client pc should be sent to the ftp named the same way in other words i just want it to send the only file its got in the recpetion folder client side in the folder reception server side. Edited May 30, 2006 by melf Link to comment Share on other sites More sharing options...
Rick Posted May 30, 2006 Share Posted May 30, 2006 and peter-pan is line 1 result of $filetitre = FileReadLine($lecture , 1) ? Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
Rick Posted May 30, 2006 Share Posted May 30, 2006 (edited) how about... #include <FTP.au3> $lecture = FileOpen("C:\Imladris Database\Reception\name.txt", 1) $filetitre = FileReadLine($lecture , 1) $blabla = '\Reception\' & $filetitre & ".ini" $server = 'ftp.somewhere.com' $username = '****' $pass = '****' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\Imladris Database\Reception\fiche.ini', $blabla) $Ftpc = _FTPClose($Open) ps: you dont have to rename a file, you just ftpputfile it as a different name, just a thought. Edited May 30, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
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