A batch file to telnet a server and create a folder automatically
Hi,
I want to create a batch file to telnet a server and create some folders on the server.i just want to run a batch file only once and don't want to enter login details for telnet everytime.i want it automated.i have tried a lot of things but no result.Please
let me know if anyone have solution of my problem.
Thanks & regards,
mj
August 27th, 2015 11:27pm
Sorry but you cannot script telnet.
August 28th, 2015 12:29am
i want to do some operations on server using a batch file..Any other way to do it ?
-
Edited by
mj2525
21 hours 41 minutes ago
August 28th, 2015 5:31am
i want to do some operations on server using a batch file..Any other way to do it ?
Maybe, if you actually tell us what you're trying to do.
August 28th, 2015 7:53am
i want to do some operations on server using a batch file..Any other way to do it ?
-
Edited by
mj2525
Friday, August 28, 2015 9:29 AM
August 28th, 2015 9:28am
i want to copy some files from my server's one folder to another with login into my server manually.i just want to create a batch file to do this work for me.it will open the remote server in background(like telnet) log in into it..and then perform operation
and exit.
August 28th, 2015 12:39pm
Are these both windows machines on the same subnet?
if you want to copy files form one server to another and they aren't windows servers you may want to ftp or sftp them not telnet them.
both ftp and sftp can be scripted from within a batch file.
August 28th, 2015 12:49pm
Microsoft ftp cannot be scripted. Most third party ftp/sftp clients can be scripted. PowerShell can use the Net FTPClient class from a script.
August 28th, 2015 1:49pm
Microsoft ftp cannot be scripted.
Really?
PS D:\> ftp /?
FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-A] [-x:sendbuffer] [host]
-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
August 28th, 2015 5:25pm
PuTTY has some different options that might enable this. PSFTP will transfer files through a PuTTY connection. PSCP is a secure file copy through PuTTY.
putty.org
August 28th, 2015 5:29pm
Microsoft ftp cannot be scripted.
Really?
PS D:\> ftp /?
FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-A] [-x:sendbuffer] [host]
-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
Sorry - I was thinking of Telnet as it was mentioned first and I got carried away.
I have never found MS FTP command files to be all that reliable. You can't really script things. You can just send a list of commands.
August 28th, 2015 5:57pm