FTP from pc to mainframe without having to store password

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
yarnseeker
Posts: 6
Joined: 04 Jun 2010 09:49

FTP from pc to mainframe without having to store password

#1 Post by yarnseeker » 04 Jun 2010 09:53

I have an ftp script and it works just fine but I need to know IF it is possible to somehow make the userid and password get PROMPTED or PASSED when running my .BAT file.

I know how to get the userid and password in my .BAT file and I see that they can be written out and then passed to FTP but that would be a security violation here. I need to be able to pass them and not actually store them.

amel27
Expert
Posts: 177
Joined: 04 Jun 2010 20:05
Location: Russia

Re: FTP from pc to mainframe without having to store passwor

#2 Post by amel27 » 04 Jun 2010 23:09

Code: Select all

@echo off
set /p $U="User: "
(
echo open ftp.microsoft.com
echo user %$U%
echo dir
echo bye
)|ftp -n

yarnseeker
Posts: 6
Joined: 04 Jun 2010 09:49

Re: FTP from pc to mainframe without having to store passwor

#3 Post by yarnseeker » 07 Jun 2010 08:42

Perfect. Thank you so much! :D

Post Reply