 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Absolut Xero Guest
|
Posted: Tue Mar 11, 2008 2:47 pm Post subject: Uploading to FTP help |
|
|
I am working on a script for my business that allows anyone running it to access the same .ini file containing data via ftp and update it for everyone else so when it is run everyone had the most updated version.
I have the GUI, IniWrite, and UrlDownloadToFile working, it is the uploading that does not seem to be working.
I took a cue from a couple of the chat scripts posted in this forum, but nothing gets uploaded when I run it.
Here is the code:
| Code: | FTPCommandFile = %A_ScriptDir%\FTPCommands.txt
FTPLogFile = %A_ScriptDir%\FTPLog.txt
FileDelete %FTPCommandFile%
FileAppend,
(
open ftp.drivehq.com
username
password
binary
cd \log
put %A_WorkingDir%\log.ini
ls -l
quit
),%FTPCommandFile%
RunWait %comspec% /c ftp.exe -s:"%FTPCommandFile%" >"%FTPLogFile%"
FileDelete %FTPCommandFile% ; Delete for security reasons.
return
|
(the username and password was changed in this example)
Here is a copy of the FTPLog:
| Quote: | ftp> Connected to ftp.drivehq.com.
open ftp.drivehq.com
220 Welcome to the most popular FTP hosting service! Save on hardware, software, hosting and admin. Share files/folders with read-write permission. Visit http://www.drivehq.com/ftp/
User (ftp.drivehq.com:(none)):
331 User name ok, need password.
230 User successfully logged on.
ftp> binary
200 Type set to I
ftp> cd \log
250 CWD command successful. "/log" is current directory.
ftp> ftp> put C:\Documents and Settings\Administrator\Desktop\BCStuff\log.ini
ls -l
200 Port command successful.
550 Permission denied.
ftp> quit
220 Bye
|
I am not real advanced in writing scripts, so if someone could point out what I am doing wrong, or have any input I would appreciate it.
Thanks in advance. |
|
| Back to top |
|
 |
Absolut Xero
Joined: 11 Mar 2008 Posts: 4 Location: Midland, MI
|
Posted: Tue Mar 11, 2008 7:00 pm Post subject: |
|
|
I solved the problem on my own, this thread is dead. _________________ "We in America do not have government by the majority. We have government by the majority who participate."
Thomas Jefferson |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|