Search found 3976 matches

by Squashman
05 Nov 2019 18:19
Forum: DOS Batch Forum
Topic: [SOLVED] Delete row in >> %OUTPUT%.
Replies: 8
Views: 212

Re: Delete row in >> %OUTPUT%.

Good evening, I have a batch script that outputs to a file, for example . . . echo Title: %var1% >> %OUTPUT% echo Title: %var2% >> %OUTPUT% echo Title: %var3% >> %OUTPUT% It can leave several blank lines in between even though there are none in the code. Now I am pretty sure the answer is going to ...
by Squashman
03 Nov 2019 19:47
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 27
Views: 9901

Re: Foxidrive has left us

Squashman wrote:
02 Nov 2018 14:14
Squashman wrote:
02 Nov 2017 08:50
Well it is technically November 3rd in Australia......

Still have not forgotten about you! Hope you are in a good place living out eternity and partying like its 1999.
Well this year it is already a day late. Still remembering you.
by Squashman
09 Oct 2019 21:33
Forum: DOS Batch Forum
Topic: Remove Microsoft header from cmd, for example when executing code from alternate data stream
Replies: 10
Views: 2050

Re: Remove Microsoft header from cmd, for example when executing code from alternate data stream

What is your end game for using ADS? Just want to make you aware that the ADS is only local to the system you are using it on. If you try to upload or email a file with an ADS, only the main data stream is transferred.
by Squashman
27 Sep 2019 12:02
Forum: DOS Batch Forum
Topic: how to check file exists or not : batch script
Replies: 2
Views: 1604

Re: how to check file exists or not : batch script

The help file gives some pretty clear information on how to do that. C:\>if /? Performs conditional processing in batch programs. IF [NOT] ERRORLEVEL number command IF [NOT] string1==string2 command IF [NOT] EXIST filename command NOT Specifies that Windows should carry out the command only if the c...
by Squashman
27 Sep 2019 10:00
Forum: DOS Batch Forum
Topic: non-buffering FOR /F alternative
Replies: 7
Views: 2282

Re: non-buffering FOR /F alternative

So is reading the file similar to what you were doing here?

Essentially tailing a file?

Code: Select all

@echo off
call :Loop <"tailme.txt"

exit

:Loop
set "line="
set /p "line="
if defined line (
  echo %line%
) else (
  pathping -q 1 -p 300 localhost >nul
)
goto :loop
by Squashman
03 May 2019 08:22
Forum: DOS Batch Forum
Topic: Dir with wildcard returning unexpected result
Replies: 4
Views: 1262

Re: Dir with wildcard returning unexpected result

I'm not using the short name format. I tried with the /X and i still get filenames I dont want Never said you were using short file names nor did I say using /X would solve your problem. I am saying the default behavior is that the WILDCARD will also match short file names. The EXAMPLE your provide...
by Squashman
02 May 2019 15:49
Forum: DOS Batch Forum
Topic: Dir with wildcard returning unexpected result
Replies: 4
Views: 1262

Re: Dir with wildcard returning unexpected result

It is matching the short file names. 8.3.
Run the DIR command from a command prompt and use the /X option to see what I mean.
by Squashman
01 May 2019 08:46
Forum: DOS Batch Forum
Topic: Get Parent Directory as a variable
Replies: 6
Views: 1455

Re: Get Parent Directory as a variable

The help files for the CALL and FOR commands explain the modifiers you can use to get a files parent directory. CALL In addition, expansion of batch script argument references (%0, %1, etc.) have been changed as follows: %* in a batch script refers to all the arguments (e.g. %1 %2 %3 %4 %5 ...) Subs...
by Squashman
27 Apr 2019 20:56
Forum: DOS Batch Forum
Topic: gzip batch
Replies: 30
Views: 5830

Re: gzip batch

C:\>C:\BatchFiles\GZIP>gz.bat index.html Le client ne dispose pas d’un privilège nécessaire. C:\>C:\BatchFiles\GZIP>gz.bat file.css Le client ne dispose pas d’un privilège nécessaire. C:\>C:\BatchFiles\GZIP>gz.bat foobar.js Le client ne dispose pas d’un privilège nécessaire. All three of those comm...
by Squashman
27 Apr 2019 20:40
Forum: DOS Batch Forum
Topic: Color Ascii Art
Replies: 8
Views: 9695

Re: Color Ascii Art

lylalandry wrote:
27 Apr 2019 03:25
How you convert image to ascii?
Reading is fun.
by Squashman
27 Apr 2019 20:37
Forum: DOS Batch Forum
Topic: Hard link in batch
Replies: 11
Views: 2571

Re: Hard link in batch

Would have never occurred to me to think a wildcard would work with creating any type of link.
by Squashman
27 Apr 2019 16:29
Forum: DOS Batch Forum
Topic: Hard link in batch
Replies: 11
Views: 2571

Re: Hard link in batch

It would help if you told us what the error was and what line of code was producing that error.
by Squashman
22 Apr 2019 08:43
Forum: DOS Batch Forum
Topic: Some content of text file lost when printing to screen
Replies: 17
Views: 5610

Re: Some content of text file lost when printing to screen

sincos2007 wrote:
22 Apr 2019 05:24
I have seen following syntax in bash shell
doubtful.
by Squashman
21 Apr 2019 16:09
Forum: DOS Batch Forum
Topic: Some content of text file lost when printing to screen
Replies: 17
Views: 5610

Re: Some content of text file lost when printing to screen

sincos2007 wrote:
20 Apr 2019 23:54
aGerman wrote:
20 Apr 2019 12:03
Give this a go:

Code: Select all

>>"txt2.txt" findstr /vb "##" "txt1.txt"
Steffen
Hi Steffen,

With your code, how can I get count of lines starting with ##

And I want to do some operations on the line not starting with ##, what should I do?

Thanks
Scope creep!