Search found 983 matches

by ShadowThief
25 Sep 2020 20:04
Forum: DOS Batch Forum
Topic: How to use a POST request in batch with curl.exe?
Replies: 7
Views: 114

Re: How to use a POST request in batch with curl.exe?

There are two methods listed there: -d and -F. I know for a fact that -F works because I use it on a regular basis to upload to imgur. Give me example of -F command. I'm using the command below and the http server doesn't show any access attempt. curl -d "name=test&phone=00000000" http://127.0.0.1/...
by ShadowThief
23 Sep 2020 07:36
Forum: DOS Batch Forum
Topic: How to use a POST request in batch with curl.exe?
Replies: 7
Views: 114

Re: How to use a POST request in batch with curl.exe?

There are two methods listed there: -d and -F. I know for a fact that -F works because I use it on a regular basis to upload to imgur.

It's hard to troubleshoot your issue if you don't give us more details, like where you're trying to send the command or what the exact commands that you tried were.
by ShadowThief
04 Sep 2020 10:18
Forum: DOS Batch Forum
Topic: new way for downloading files
Replies: 4
Views: 330

Re: new way for downloading files

Maybe you should try actually reading the article instead of freaking out and insulting trusted members of the community. The point was that Windows Defender comes with a utility called MpCmdRun.exe, which can be used to download files. This could be useful in scripts that aren't running on Windows ...
by ShadowThief
03 Sep 2020 11:40
Forum: DOS Batch Forum
Topic: Problem with .bat
Replies: 1
Views: 227

Re: Problem with .bat

Somehow, several of your dashes have become Unicode characters. Either rewrite the code by hand, or copy the dash from "-decrypt" onto the other dashes, since that one was unchanged.
by ShadowThief
29 Aug 2020 17:58
Forum: DOS Batch Forum
Topic: Letter used in a variable.
Replies: 15
Views: 1212

Re: Letter used in a variable.

%\n% is line continuation and used purely for aesthetics.
echo/ does the same thing as echo. and echo( and they all print a blank line
by ShadowThief
27 Aug 2020 19:37
Forum: DOS Batch Forum
Topic: What does this Batch file do?
Replies: 8
Views: 655

Re: What does this Batch file do?

ShadowThief: Thank you for taking the trouble to respond and indeed I have gained a tad more information. You essentially were given what is in the help file for the Robocopy command which you could have read yourself. If you want to read the help file, you first have to know the help file exists.
by ShadowThief
26 Aug 2020 16:35
Forum: DOS Batch Forum
Topic: What does this Batch file do?
Replies: 8
Views: 655

Re: What does this Batch file do?

Good news, there's a grand total of two unique commands in that script, so this is going to be super fast. REM is a comment. It does nothing. ROBOCOPY copies files from a source folder to a destination folder. /MIR copies any subdirectories as well /R:2 retries twice if errors are encountered /W:5 w...
by ShadowThief
21 Aug 2020 07:27
Forum: DOS Batch Forum
Topic: Arrow keys
Replies: 5
Views: 594

Re: Arrow keys

I have never seen any version of choice that supports an /S option, certainly not in any standard Windows CHOICE command. Not surprisingly, this does not work on my Windows 10 machine. You must have a non-standard CHOICE.EXE file. Dave Benham https://www.robvanderwoude.com/choice.php It looks like ...
by ShadowThief
20 Aug 2020 13:48
Forum: DOS Batch Forum
Topic: auto updater of new releases
Replies: 9
Views: 2038

Re: auto updater of new releases

You shouldn't have to log into it at all, but it's the same content as https://ss64.com/nt/net-use.html
by ShadowThief
16 Aug 2020 09:48
Forum: DOS Batch Forum
Topic: How do I get an extension if the filename has two dots?
Replies: 1
Views: 391

Re: How do I get an extension if the filename has two dots?

Why would .aaa.txt be the extension instead of just .txt? What if you had A.File.Name.Like.This.2020.HEVC.x265.mkv?

Also, %~r doesn't work because %~r isn't a valid variable substitution command. %~x gets the extension.
by ShadowThief
10 Aug 2020 17:43
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 1388

Re: Performance Issues with Code

I'd love to see the times you ended up with, because all of my tests have my code run about 10 seconds faster than anything else that's been posted so far.
by ShadowThief
05 Aug 2020 13:21
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 1388

Re: Performance Issues with Code

PS - Please post the timing of my two versions... I ran both versions ten consecutive times with the same million-line data file. Version 1: Start: 14:53:15.67 End: 14:54:17.30 Duration: 61.6 seconds Start: 14:54:17.31 End: 14:55:19.49 Duration: 62.2 seconds Start: 14:55:19.49 End: 14:56:21.07 Dura...
by ShadowThief
04 Aug 2020 17:32
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 1388

Re: Performance Issues with Code

In my tests, it saved about 2-3 seconds on a million-line file, so I don't think they'd see any benefits on their side, unfortunately. Thanks, @ShadowThief! Inspired by @Aacini's solution, some pseudo-code as I dont have the time and experience to convert this to proper code: Instead of month n=1.....
by ShadowThief
04 Aug 2020 15:35
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 1388

Re: Performance Issues with Code

My tests have your code process one million lines in an average of 60 seconds.
by ShadowThief
04 Aug 2020 12:12
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 1388

Re: Performance Issues with Code

However , "not setting a variable" gave me an idea to not set the !MONTH! variable at all, and now the script runs in about half the time. @echo off SETLOCAL ENABLEDELAYEDEXPANSION echo %TIME% :: Month hashes set /a "month_val[January]=1", "month_val[Jan]=1", "month_val[1]=1", "month_val[01]=1" set...