Input\Output Batch File

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

AndrewUsh

Thread Starter
Joined
Jan 28, 2013
Messages
3
Hi,

Just a quick question really. im trying to create a batch file where the input and output are combined in one file. Is this possible?

Thank you

Andrew
 

Squashman

Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
An example of your input and what you want the output to look like would probably help.
 

foxidrive

Banned
Joined
Oct 20, 2012
Messages
793
An answer in another forum:

Code:
@echo off
for /f "delims=" %%a in (file.txt) do (
>>file.txt echo output: %%a
)
 
Joined
Jan 24, 2013
Messages
5
Following code will take input from same file and paste output in same file.

FOR /F "usebackq tokens=*" %%a in ("log.txt") do echo %%a >> "log.txt"
 

AndrewUsh

Thread Starter
Joined
Jan 28, 2013
Messages
3
Basically i'm trying to individually add a large amount of users to 64 servers.

so what i meant by input and ouput is that it shows you the command you running and the response it gives.

If someone already has access to a server it states dsadd failed: already a member.

Unfortunately some people used '0' instead of 'o' when inputting server names, so when i try to add them to that server i just get dsadd failed.

Because of the large amount of commands being used, i cant see which command has failed

Does that make sense?

Do the commands given above allow me to do that?
 

foxidrive

Banned
Joined
Oct 20, 2012
Messages
793
You are running a batch file with the 'dsadd' tool in I presume.
As long as it doesn't require keyboard input launch it like this:

Code:
batch.bat >dsadd-log.txt
and then you can filter the log file with a command looking for errors and examine dsadd-error.txt

Code:
find "already a member" <dsadd-log.txt >dsadd-error.txt
 

foxidrive

Banned
Joined
Oct 20, 2012
Messages
793
The same thing applies. I used dsadd as filenames because thats what was in your text.

The filenames aren't important.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top