| 1. |
Solve : data stripping? |
|
Answer» Hi all 6. I dont have any other tools, programmes on the PC other stand standard dos commands. - and cant load any other programmes either. did you really mean standard dos?? or is it win nt cmd.exe (the black box window that some people mistakenly think is dos). i dont have a solution for standard dos, but the following code is tested on: C:\>ver Microsoft Windows XP [Version 5.1.2600] Code: [Select]@echo off & setlocal for /f "skip=4 tokens=2,3" %%a in (test.txt) do if not defined vtime set v%%a=%%b echo adef -l %vsize% -h %vtime% Quote 1. log onto PC2 via PC1 using telnet Logging on to a computer using Telnet could potentially be malicious. Reno did you really mean standard dos?? or is it win nt cmd.exe (the black box window that some people mistakenly think is dos). > cmd.exe it is. & many thanks for the help with the code, i will try it out. BatchFileCommand Logging on to a computer using Telnet could potentially be malicious. > These comps are all behind very heavy firewalls, and can only "talk" to each other. Thats why telnet is a viable OPTION, and the only option. I get a logon prompt thats always the same (we use pragma telnet server) the only thing that would be different is the user input for the username and password. So any help in performing that task would be great. Many Thanks so far Dalii dont have telnet access to try. type telnet -help or telnet /? to see if anything intresting can be found there. and paste the help info here. also try this code to see if it can pass username to telnet. echo usernamehere|telnet hostnamehereCode: [Select]echo usernamehere|telnet hostnamehere Or you can do this: Code: [Select]echo %username% | telnet hostnamehere That is a system set variable that automatically puts your user name.lQuote from: dali1972 on March 06, 2009, 10:06:34 AM 6. I dont have any other tools, programmes on the PC other stand standard dos commands. - and cant load any other programmes either.sorry, but this is a rant. I don't see why you can't load any programs that makes your programming life easier. If you are a programmer doing a batch job like this for your company, you can have your boss approve the use of those tools. doing telnet automation with sucky telnet client from windows just doesn't cut it. What happens after this ? Code: [Select]echo usernamehere|telnet hostnamehere you are expected to execute some commands on the other side. The above statement is not enough to do all that. Get a real programming language that have libraries that supports the Telnet protocol with proper error control. your boss should understand you have these restrictions. |
|