nico666 Posted April 16, 2006 Posted April 16, 2006 Hello. I need to give The computer name to the name of the file in my ftp: #include <FTP.au3> $server = 'perso-ftp.wanadoo.fr' $username = 'my.username' $pass = 'mypass' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\test.txt', '/@ComputerName.txt') ; my problem is here :S $Ftpc = _FTPClose($Open) Can you help me please
SpookMeister Posted April 16, 2006 Posted April 16, 2006 Hello. I need to give The computer name to the name of the file in my ftp: #include <FTP.au3> $server = 'perso-ftp.wanadoo.fr' $username = 'my.username' $pass = 'mypass' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\test.txt', '/@ComputerName.txt'); my problem is here :S $Ftpc = _FTPClose($Open) Can you help me please Not tested... but perhaps: #include <FTP.au3> $server = 'perso-ftp.wanadoo.fr' $username = 'my.username' $pass = 'mypass' $file_name = @ComputerName & ".txt" $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\test.txt', $file_name); my problem is here :S $Ftpc = _FTPClose($Open) [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
Thatsgreat2345 Posted April 16, 2006 Posted April 16, 2006 (edited) ur probelm was u put the thing in quotes not /@computername & '.txt' Edited April 16, 2006 by thatsgreat2345
nico666 Posted April 16, 2006 Author Posted April 16, 2006 I just have a second question :"> If i have the script in same folder that 'test.txt' , Can I do something for have : , '\test.txt' and not : , 'C:\test.txt' ? Thanx for help
Thatsgreat2345 Posted April 16, 2006 Posted April 16, 2006 (edited) just typing \ automaticaly takes you to the C:\ drive so in ur case if the text file was in the C:\ drive its going to be opened there but if u moved it then no its not going to work - to test just go write a \ in a folder Edited April 16, 2006 by thatsgreat2345
nico666 Posted April 16, 2006 Author Posted April 16, 2006 hmm so if u have the script & the "test.txt" in: c:\test\script\ I can't do anything for just have , '\test.txt' ?
Thatsgreat2345 Posted April 16, 2006 Posted April 16, 2006 (edited) ok if you go to C:\ if u just type \test.txt then its going to work for you BUT if you have the file in c:\test\script\text.txt and ur only using \test.txt its going to look in just c:\test.txt so there is a way and im pretty sure using @scriptdir Edited April 16, 2006 by thatsgreat2345
ChrisL Posted April 16, 2006 Posted April 16, 2006 hmm so if u have the script & the "test.txt" in: c:\test\script\ I can't do anything for just have , '\test.txt' ? @scriptdir & '\test.txt' [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
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