Search found 265 matches

by goodywp
24 Oct 2024 12:02
Forum: DOS Batch Forum
Topic: Why here echo double times?
Replies: 4
Views: 73477

Re: Why here echo double times?

Great! it really help to understand the steps!
Thank Saso!!!!
by goodywp
22 Oct 2024 11:16
Forum: DOS Batch Forum
Topic: Why here echo double times?
Replies: 4
Views: 73477

Re: Why here echo double times?

Oh Ya Thanks for picking up the mistake...
by goodywp
22 Oct 2024 07:38
Forum: DOS Batch Forum
Topic: Why here echo double times?
Replies: 4
Views: 73477

Why here echo double times?

Hi all, This code below I was using before. But today I used it again just found that it echo double times, I need know why that happened... The Sample.txt just list as NAXAUTO-1 NAXAUTO-2 NAXAUTO-3 NAXAUTO-4 NAXAUTO-5 NAXAUTO-6 NAXAUTO-7 NAXAUTO-8 NAXAUTO-9 NAXAUTO-10 NAXAUTO-11 NAXAUTO-12 I used t...
by goodywp
15 Oct 2024 09:45
Forum: DOS Batch Forum
Topic: How to set and make a range of values working in one function
Replies: 6
Views: 15961

Re: How to set and make a range of values working in one function

Thanks Miskox! It works but I removed your code for generating input.txt since I already had input.txt @echo off setlocal DisableDelayedExpansion For /f %%a In ('WMIC Path Win32_LocalTime Get DayOfWeek^|Findstr [0-6]') Do ( Set DOW=%%a) IF %DOW%==1 (set randomline=#151#158#204#211#252#260#310#316#) ...
by goodywp
11 Oct 2024 07:03
Forum: DOS Batch Forum
Topic: How to set and make a range of values working in one function
Replies: 6
Views: 15961

Re: to set variable in a range of values

Thanks! I tried below and only got the last value setlocal DisableDelayedExpansion FOR %%G IN (152 159 198 205) DO set "randomline=%%G" set "lineno=0" ( FOR /F "delims=" %%L in ('findstr /n "^" Input1.robot') do ( set /a lineno+=1 set "line=%%L" setlocal EnableDelayedExpansion if "!lineno!"=="%rando...
by goodywp
10 Oct 2024 15:52
Forum: DOS Batch Forum
Topic: How to set and make a range of values working in one function
Replies: 6
Views: 15961

How to set and make a range of values working in one function

Hi All, I have a piece of code below to insert string after that line number. setlocal DisableDelayedExpansion set randomline=267 set "lineno=0" ( FOR /F "delims=" %%L in ('findstr /n "^" Input.robot') do ( set /a lineno+=1 set "line=%%L" setlocal EnableDelayedExpansion if "!lineno!"=="%randomline%"...
by goodywp
07 Oct 2024 07:51
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

Thanks Antonio! Yes it was my bad and did not attached the real sample of my input file. Just tried to make it simple and did not realize that something weird come up along with the real samples. So when I tried to use your code to do the insertation on my real files not the simplified file at the b...
by goodywp
04 Oct 2024 09:48
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

I also tried to split this input file into two files using string Test_Cases or only Cases to separate the file.
But end up many in searching but none of it works for me so far. Any idea to do this job so that I can use the code to do the insertation.
Thanks
by goodywp
03 Oct 2024 14:29
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

Hi Aacini, just realized that there are some issue regarding some characters as this From the attached two files, one input.txt and output.txt You can see this code did the job but also did some extra job such as if the orignal input.txt has this != ----> = will show up as in output.txt if the orig...
by goodywp
03 Oct 2024 12:14
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

Hi Aacini, just realized that there are some issue regarding some characters as this From the attached two files, one input.txt and output.txt You can see this code did the job but also did some extra job such as orignal in input.txt = ----> in output.txt become != orignal in input.txt - ----> in ou...
by goodywp
03 Oct 2024 10:29
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

Terrific! After changed the DATE format for that PC and it works!
Thanks again Aacini!
by goodywp
03 Oct 2024 08:59
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

I gave a try just using the above code and input.txt
I got this Missing operand...no more details...
by goodywp
02 Oct 2024 13:32
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

Re: How to ramdomly select test cases among the test suite to run daily?

Thanks Aacini! My bad! I think that the output maybe confused you as example I showed above. What my intention was to automatically the insert this line [Tags] BVTN into diffferent test case name lines in the Test_Suite file as more detailed example as below: Let's take Monday as example. First we h...
by goodywp
02 Oct 2024 10:09
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 23456

How to ramdomly select test cases among the test suite to run daily?

Hi all, I have a task to run robot framework test cases automatically. I set up everything and the only thing I faced is to select about 10 test cases to be run each day, and within a week, the whole test suites are ideally to be run at least once., let's say about 90%, not necessary this number... ...