Search found 3970 matches

by Squashman
18 Apr 2019 10:22
Forum: DOS Batch Forum
Topic: gzip batch
Replies: 30
Views: 3913

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: 492

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: 1005

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: 660

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: 727

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: 1421

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: 18
Views: 1945

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: 18
Views: 1945

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: 858

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: 858

Re: decoding questionmark in batch

Could please provide an example.
by Squashman
24 Mar 2019 18:12
Forum: DOS Batch Forum
Topic: Directory "file dates" keep changing (for DIR) - Win 10
Replies: 9
Views: 1167

Re: Directory "file dates" keep changing (for DIR) - Win 10

I really don't see how you think this is so shocking. You are making a change to the file system. Any file system is going to do this. This isn't just a Microsoft thing.
by Squashman
24 Mar 2019 16:53
Forum: DOS Batch Forum
Topic: Directory "file dates" keep changing (for DIR) - Win 10
Replies: 9
Views: 1167

Re: Directory "file dates" keep changing (for DIR) - Win 10

MicrosoftIsKillingMe wrote:
24 Mar 2019 15:22
I do once in a while MD \scratch\ and later RD that; I hope it's not something ridiculous like that.
Anything you do inside a directory will change it's modified time. That would include making and deleting folders. Creating Files. Deleting Files.
by Squashman
24 Mar 2019 13:32
Forum: DOS Batch Forum
Topic: Directory "file dates" keep changing (for DIR) - Win 10
Replies: 9
Views: 1167

Re: Directory "file dates" keep changing (for DIR) - Win 10

Sounds like a wild goose chase to me. There is no way for us to tell you what is modifying the files.