batch file to upload a file

September 12, 2012 at 19:57:26
Specs: Windows XP
hi profs :)
can you help me to create a batch script to upload a certain file to FTP server without showing my username and password in this script??

See More: batch file to upload a file

Report •


#1
September 13, 2012 at 16:49:51
hey ,very easy acttualy.
What you will do is , you will run the ftp commands from a txt file
to do that make a txt file with the commands next type this comand
ftp -s:c:\ThePlace\TextFileName.txt
this will open the ftp connection with the commands that set in your txt, (in the txt dont write the command FTP), but you need one more thing you need to redirect the output from that command to somewere else or to no wehere to do it type ftp -s:c:\ThePlace\TextFileName.txt>outputTohere.txt

@echo off
ftp -s:c:\ThePlace\TextFileName.txt>outputTohere.txt
del outputTohere.txt
exit

or this
@echo off
ftp -s:c:\ThePlace\TextFileName.txt>nul
exit


done! stay cool!

Batch scripts 4every1
http://x.co/niqz


Report •

#2
September 13, 2012 at 22:15:14
To keep BAT contents secret, compile it.


====================================
Life is too important to be taken seriously.

M2


Report •

#3
September 18, 2012 at 06:46:22
ok _e thx for reply but i guess it still the same problem i think this .txt file still contain some readable data and my ftp server require username and password for authentication and i wanna to hide them....any solutions?


Report •

Related Solutions

#4
September 18, 2012 at 10:08:04
You'll have to change to a protocol that supports token based authentication. Maybe something like SSH FTP. If that's too much of a hassle, and honestly it is, you should set up a service account that can FTP files to that one directory on the server, and nothing more. That way you don't care if someone gets the login credentials or not.

How To Ask Questions The Smart Way


Report •

#5
September 20, 2012 at 03:08:09
reread #2

you need to compile it


====================================
Life is too important to be taken seriously.

M2


Report •

#6
September 21, 2012 at 03:51:23
i can compile it but when it runs the output .bat file can be read......any other solutions ??

Report •

#7
September 21, 2012 at 05:17:49
Well . . . mine.

How To Ask Questions The Smart Way


Report •

#8
September 21, 2012 at 09:01:51
Razor its so complicated lol

Report •


Ask Question