Search found 11 matches

by navanees
24 Mar 2017 18:08
Forum: DOS Batch Forum
Topic: Arithmetic Operation
Replies: 7
Views: 6795

Arithmetic Operation

Please Help: Type1: @echo off set CURRMonth=09 set /a CURRMonth+=1 echo %CURRMonth% > Output.txt exit Output is: 1 Type2: @echo off set CURRMonth=9 set /a CURRMonth+=1 echo %CURRMonth% > Output.txt exit Output is: 10 What I am trying to solve is, no matter how many number of '0' assigned infront of ...
by navanees
19 Oct 2016 17:54
Forum: DOS Batch Forum
Topic: Emailing using Bat script
Replies: 2
Views: 9279

Emailing using Bat script

Is there a way to send emails using windows bat script from any of the servers in the network?

-NN
by navanees
19 Sep 2016 22:05
Forum: DOS Batch Forum
Topic: Compare two files and send common strings to another file
Replies: 3
Views: 4203

Re: Compare two files and send common strings to another file

Acini,
findstr /G:file2 file1 > output ... it worked as expected.

Yes, basket was missing .. thanks for your response, appreciate it !!!
by navanees
19 Sep 2016 18:23
Forum: DOS Batch Forum
Topic: Compare two files and send common strings to another file
Replies: 3
Views: 4203

Compare two files and send common strings to another file

I have two text files and wanted to compare them and send the common strings to another file There will be only one word per line. Strings can appear in any order, so it is not a line to line comparison. I have sample files and the expected output attached below. Please can someone help me with .bat...
by navanees
21 Jul 2016 17:55
Forum: DOS Batch Forum
Topic: Script to find and replace a string in a text file
Replies: 2
Views: 3434

Script to find and replace a string in a text file

I am looking for a batch script that can find and replace a string in a text file and send it to another file . Its just like the find and replace function in text or excel The order should remain the same. Does anyone has a batch script built for this? Here is the sample file I have these random wo...
by navanees
21 Jul 2016 14:22
Forum: DOS Batch Forum
Topic: Batch script to find and replace
Replies: 10
Views: 7735

Re: Batch script to find and replace

That was just AWESOME!!!!!!!!!!!!!!

I was working on this for more than a week! and I cant just explain how well it worked!


THANKS A LOT!!!!

-NN
by navanees
21 Jul 2016 13:26
Forum: DOS Batch Forum
Topic: Batch script to find and replace
Replies: 10
Views: 7735

Re: Batch script to find and replace

Completely understand! :D

Is there a way around for this requirement?
by navanees
21 Jul 2016 13:13
Forum: DOS Batch Forum
Topic: Batch script to find and replace
Replies: 10
Views: 7735

Re: Batch script to find and replace

Yes I was replying to you.. You are awesome, I bet! and it worked. Fault is mine as my requirement is slightly different here. (and I am not that expert in scripting and I tried to make it simple with my previous example!) Here is what I am actually looking for Input file ===========================...
by navanees
21 Jul 2016 12:44
Forum: DOS Batch Forum
Topic: Batch script to find and replace
Replies: 10
Views: 7735

Re: Batch script to find and replace

I need to retain the lines that have Name:
instead I need to replace where it sees Amount: to >>>>> Amount: 0, regardless of what value it has
by navanees
21 Jul 2016 12:02
Forum: DOS Batch Forum
Topic: Batch script to find and replace
Replies: 10
Views: 7735

Re: Batch script to find and replace

Thanks and appreciate your response. The script worked well however from troubleshooting perspective it seems I will have tough time in fixing the code in case of an issue in future. I'm sure this can also be achieved with a simple batch script using string manipulation/operation. Appreciate if some...
by navanees
20 Jul 2016 16:47
Forum: DOS Batch Forum
Topic: Batch script to find and replace
Replies: 10
Views: 7735

Batch script to find and replace

I have the below data in a file and wanted to write a batch to replace the data as below Original data ============== Name: xyz Amount: 123 Name: abc Amount: 456 Name: def Amount: 789 Name: ghi Amount: 012 Name: ijk Amount: 345 Name: lmn Amount: 678 Name: uvw Amount: 901 Name: xyz Amount: 234 Data i...