#1
Hi i want to make it so I run a .bat file (or .exe or whatever), and windows will upload a file to my site. here is the bat script i hav been using:

@echo open xxxxxxxxx.xxxxxxxxxxxxxx.com >> t
@echo (myusername) >> t
@echo (mypass) >> t

@echo binary >> t

@echo mput test.txt >> t
@echo bye >> t
@ftp -i -s:t
@del t

when i go through this in cmd step by step, it uploads fine
but when i run the .bat, it gets to user account OK, password required, access denied (or something like that).
Programmers / developers etc. please help

Rob
tl;dr : IM BETTER THAN YOU
#4
Quote by saphrax
Honestly mate, keeping your security credentials in an .BAT file is a bad idea.


I have also tried using the
@echo -s ftp.txt>> t
line in place of the user / pass, but still to no avail.

How would I go about hiding / encrypting / these credentials, is there anyway to do it?


Quote by saphrax
I can't help without the original application.


Right. What does that mean, you want to know the name of the site etc?
tl;dr : IM BETTER THAN YOU
#5
Look into Tcl and an extension called Expect.
▼▲
Quote by shdowfox17
awesome avatar,denn0069!
Quote by Valo
The most truth I've heard in the pit.
ever.
▼▲
#6
I have also tried using the
@echo -s ftp.txt>> t
line in place of the user / pass, but still to no avail.

How would I go about hiding / encrypting / these credentials, is there anyway to do it?


Not in a BAT file that I know of.



Right. What does that mean, you want to know the name of the site etc?


Naw, I saw the name xxx.xxx.com and assumed that it was an executable COM file, not a website. May I ask why you want to write a BAT file to upload to an FTP server anyway?
#7
Quote by denn0069
Look into Tcl and an extension called Expect.


will do

Quote by saphrax
May I ask why you want to write a BAT file to upload to an FTP server anyway?


i assume that by editing a txt file (say list.txt) and putting it in here:


@echo mput test.txt >> t

doing something like
@echo -s list.txt>> t

(will work that out after login fixed)

I can upload whichever files in list.txt quickly and more easily.
tl;dr : IM BETTER THAN YOU