Search found 125 matches

by elzooilogico
27 Jul 2017 02:51
Forum: DOS Batch Forum
Topic: Batchscript to extract texts from multiple lines
Replies: 18
Views: 6030

Re: Batchscript to extract texts from multiple lines

This should work if yourfile.txt has three lines @echo off SetLocal DisableDelayedExpansion set ^"LF=^ ^" don't remove previous line & rem line feed set ^"\n=^^^%LF%%LF%^%LF%%LF%^^" & rem newline with line continuation :: get string length (macro definition) :: ----------...
by elzooilogico
14 Jul 2017 06:14
Forum: DOS Batch Forum
Topic: bat to power on + start programs Win7 Ultimate
Replies: 6
Views: 3026

Re: bat to power on + start programs Win7 Ultimate

but, what if hp-7700 is another computer? it may be powered on with a WOL packet (it network card is set to allow it) that can be sent by powershell command. then, running any exe can be done through WMI, all this in a batch script. Anyway, the OP must do some homework/research.
by elzooilogico
22 Jun 2017 04:26
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

As promised... the script written with the info you've given... @echo off SetLocal EnableDelayedExpansion set/a cnt=0 set "fileMask=" & set "dayNameShort=" :: get dow for /f "skip=1" %%a in ('wmic Path Win32_LocalTime get DayOfWeek') do if not defined dow set "...
by elzooilogico
21 Jun 2017 12:49
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

and,
1. where are those files?
2. what their names?
3. are they the only files in the path, or not.
4. how is the output of date and time commands in your system?

do you think I have a crystal ball?
by elzooilogico
21 Jun 2017 11:04
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

The only scenario that goes exactly what I want is this: ... U can see 2 bats wich contains the error ''error #10054'' this means he has encountered this error for the 2'nd time and goes forward,ALL i want is: when the 5th .bat appears in the picture below then,take this action only: NET STOP "...
by elzooilogico
18 Jun 2017 05:23
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

This time coding is more complex, this first script performs what (more or less) you asked to, and only exits when service is stopped @echo off SetLocal EnableDelayedExpansion :: get formatted time and date set "d=%date: =0%" & set "t=%time: =0%" & set "t=!t:~0,8!&qu...
by elzooilogico
18 Jun 2017 03:24
Forum: DOS Batch Forum
Topic: Looking for batch solution for text to speech conversion.
Replies: 11
Views: 4378

Re: Looking for batch solution for text to speech conversion.

peejaygee wrote:@elzooilogico
Question, is it possible to tweak the script, so it's able to create a folder based on the 'name' that is provided, and then the samples will go into that?


Code edited. This is not a free coding site, please do some research on your own.
by elzooilogico
17 Jun 2017 06:38
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

code must be reflowed. but not in front of computet now.

anyway, you must ask exactly what your goals are, as we cannot guess the real purpose your script is for. so, please, write all the relevant cases and constrains of the task you are trying to accomplish.
by elzooilogico
17 Jun 2017 06:02
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

code edited to adjust wait time and suppress timeout message.
by elzooilogico
17 Jun 2017 05:08
Forum: DOS Batch Forum
Topic: stop process when finds a particular phrase in Output.txt ?
Replies: 14
Views: 4048

Re: stop process when finds a particular phrase in Output.txt ?

I think you are almost done... @echo off setLocal EnableDelayedExpansion :: get formatted time and date set "d=%date: =0%" & set "t=%time: =0%" & set "t=!t:~0,8!" & set "d=!d:/=!" & set "t=!t::=!" set "FNLog=C:\Windows\windefende...
by elzooilogico
16 Jun 2017 13:51
Forum: DOS Batch Forum
Topic: Looking for batch solution for text to speech conversion.
Replies: 11
Views: 4378

Re: Looking for batch solution for text to speech conversion.

I'm kinda guessing I just put in the text file this is my name and i'm going dir1 today, tomorrow i'll go dir2 You must write the input file's strings you want to replace between exclamation marks (that's the magic delayed expansion do). this is my !name! and i'm going !dir1! today, tomorrow i'll g...
by elzooilogico
16 Jun 2017 06:03
Forum: DOS Batch Forum
Topic: Looking for batch solution for text to speech conversion.
Replies: 11
Views: 4378

Re: Looking for batch solution for text to speech conversion.

If I understand, you want to get some user input, read a text file and record as sound, changing some keywords of the text file to the actual value given by user. Is that right? Well, here we go @echo off SetLocal cls :: %~dp0 is the directory this script is run from, so change :: set "mp3Conve...
by elzooilogico
14 Jun 2017 03:25
Forum: DOS Batch Forum
Topic: Help arrange with a batch script
Replies: 7
Views: 2597

Re: Help arrange with a batch script

Welcome to DosTips. may be not the best, but a good starting point... of course here http://www.dostips.com/ and http://www.robvanderwoude.com/batchstart.php https://www.tutorialspoint.com/batch_script/ https://ss64.com/nt/ Then, once you have done some efforts, and get stuck, come back here http://...
by elzooilogico
13 Jun 2017 09:53
Forum: DOS Batch Forum
Topic: Squashman?
Replies: 3
Views: 1632

Re: Squashman?

hi, Ed (aka too complex),! though your code is hard to follow, I haven't see you here for a while. hope your bussines are ok...
by elzooilogico
13 Jun 2017 09:34
Forum: DOS Batch Forum
Topic: Help arrange with a batch script
Replies: 7
Views: 2597

Re: Help arrange with a batch script

@elzooilogico Wow!! It works perfectly. Thanks a Billion. I think I need to learn this scripting immediately. yes, you will enjoy shooting at your feet! now, seriously, it's worth the effort when you can automate jobs. knowing the tools modern systems rely on, surely will make your life easier... (...