Search found 3958 matches

by Squashman
19 Apr 2019 15:20
Forum: DOS Batch Forum
Topic: Some content of text file lost when printing to screen
Replies: 2
Views: 11

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

Remove the line that enables delayed expansion.
by Squashman
19 Apr 2019 15:12
Forum: DOS Batch Forum
Topic: gzip batch
Replies: 16
Views: 108

Re: gzip batch

In both of your previous two examples I do not see you executing the batch file like I did in my example to show you that it works.
by Squashman
19 Apr 2019 08:35
Forum: DOS Batch Forum
Topic: gzip batch
Replies: 16
Views: 108

Re: gzip batch

Would like to remind you that this is an English speaking forum and if you want help you need to translate everything to English.
by Squashman
18 Apr 2019 10:22
Forum: DOS Batch Forum
Topic: gzip batch
Replies: 16
Views: 108

Re: gzip batch

No problems using the script on my end. Directory listing C:\BatchFiles\GZIP>dir Volume in drive C is 15_10P Volume Serial Number is DE79-4A59 Directory of C:\BatchFiles\GZIP 04/18/2019 11:20 AM <DIR> . 04/18/2019 11:20 AM <DIR> .. 04/18/2019 11:18 AM 34 file.css 04/18/2019 11:19 AM 53 foobar.js 04/...
by Squashman
18 Apr 2019 08:27
Forum: DOS Batch Forum
Topic: Is there any way to know a folder is open or not using command line?
Replies: 2
Views: 40

Re: Is there any way to know a folder is open or not using command line?

Learned this from dbenham.

Code: Select all

2>nul ren Downloads Downloads && echo Folder is NOT locked || echo folder is LOCKED
by Squashman
09 Apr 2019 08:41
Forum: DOS Batch Forum
Topic: set %RANDOM% for timeout command
Replies: 7
Views: 130

Re: set %RANDOM% for timeout command

A more concise way to get a number between 1 and 100.

Code: Select all

SET /A test=%RANDOM% %% 100 + 1
by Squashman
09 Apr 2019 08:34
Forum: DOS Batch Forum
Topic: How to sort file contents based on pattern?
Replies: 4
Views: 59

Re: How to sort file contents based on pattern?

Ah yes, very simple using the tokens. Yes as you have been shown and used several times on this forum. FOR /F "tokens=2 delims=_." %%A IN ('FINDSTR /c:"%OUTBOX_BIN%%NAME%_" %FILE%') DO ( SET "NUM=%%~A" IF !NUM! GTR !MAXNUM! SET "MAXNUM=!NUM!" & SET "MAXFILE=%NAME%_!MAXNUM!.log" ) No need to set the...
by Squashman
05 Apr 2019 07:55
Forum: DOS Batch Forum
Topic: merge multiple text files into one text file
Replies: 5
Views: 57

Re: merge multiple text files into one text file

This should be quicker.

Code: Select all

copy /b *.txt Datafile.tmp & ren Datafile.tmp DataFile.txt
by Squashman
05 Apr 2019 07:51
Forum: DOS Batch Forum
Topic: Convert 1111 2222 3333 in \x11\x11\x22\x22\x33\x33
Replies: 9
Views: 108

Re: Convert 1111 2222 3333 in \x11\x11\x22\x22\x33\x33

On StackOverFlow, when we see a broad question with limited information, we will direct the user to read the following two links:
How to ask a good question?
How to create a Minimal, Complete, and Verifiable example.

This seems like a good time to link to this information.
by Squashman
02 Apr 2019 14:46
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 16
Views: 244

Re: Ipconfig doesn't work inside a bat file

None of the Microsoft ping programs (ping, pathping, psping) output: Enter the ping options: If you are executing c:\windows\system32\ping.exe and the verbose output is Enter the ping options: , then someone hacked your system and replaced the executable. But I doubt this is the case. It is more lik...
by Squashman
31 Mar 2019 20:27
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 16
Views: 244

Re: Ipconfig doesn't work inside a bat file

Do you have any idea why the ping isn't giving me the same results as the other computer? Thanks, Docfxit Probably the same reason as why you were getting strange output from the FIND command. The windows ping command does not output what you are seeing on your screen. Open up a command prompt to t...
by Squashman
26 Mar 2019 10:53
Forum: DOS Batch Forum
Topic: decoding questionmark in batch
Replies: 5
Views: 278

Re: decoding questionmark in batch

Elogia wrote:
26 Mar 2019 10:17
Squashman wrote:
26 Mar 2019 08:57
Looks like this will help you.

https://productforums.google.com/forum/ ... jsGuMPWDUJ
Wow, thank you very much :)
Thank Google for such a robust search engine. All I did was search for your problem. It was the second link in the search results.
by Squashman
25 Mar 2019 15:27
Forum: DOS Batch Forum
Topic: decoding questionmark in batch
Replies: 5
Views: 278

Re: decoding questionmark in batch

Could please provide an example.