Search found 900 matches

by ShadowThief
28 Oct 2018 16:48
Forum: DOS Batch Forum
Topic: Getting >nul 2>&1 to work within a batch file
Replies: 12
Views: 1640

Re: Getting >nul 2>&1 to work within a batch file

Quisquose wrote:
27 Oct 2018 17:48
from within a batch file?
Did you change your mind when I wasn't looking?
by ShadowThief
28 Oct 2018 15:14
Forum: DOS Batch Forum
Topic: Getting >nul 2>&1 to work within a batch file
Replies: 12
Views: 1640

Re: Getting >nul 2>&1 to work within a batch file

And yet the doskey solution you provided
Quisquose wrote:
28 Oct 2018 10:11
works perfectly, and it's exactly what I wanted.
which doesn't make sense because
Squashman wrote:
27 Oct 2018 21:48
https://ss64.com/nt/doskey.html wrote:You cannot run a Doskey macro from a batch file.
I'm not sure what Quisquose is looking for anymore, frankly.
by ShadowThief
28 Oct 2018 11:34
Forum: DOS Batch Forum
Topic: Getting >nul 2>&1 to work within a batch file
Replies: 12
Views: 1640

Re: Getting >nul 2>&1 to work within a batch file

Anther way to "get it to work with just the word closeall on its own?" is creating a Batch file named closeall.bat with the desired command... :roll: They'd still have to either call the secondary script or make peace with the fact that it would have to be the last command in the main script.
by ShadowThief
27 Oct 2018 22:37
Forum: DOS Batch Forum
Topic: Getting >nul 2>&1 to work within a batch file
Replies: 12
Views: 1640

Re: Getting >nul 2>&1 to work within a batch file

You can, however,

Code: Select all

set "closeall=taskkill /IM "cmd.exe" /f >nul 2>&1"
%closeall%
by ShadowThief
20 Oct 2018 18:53
Forum: DOS Batch Forum
Topic: Creating a small batch program
Replies: 4
Views: 1023

Re: Creating a small batch program

The GET request is already a string; or are you trying to store the response in a string? Because that's just for /f "delims=" %%A in ('curl [request]') do set "get_response=%%A" where you replace [request] with whatever the request is. You could also use curl's -o option to store the output in a fi...
by ShadowThief
18 Oct 2018 05:11
Forum: DOS Batch Forum
Topic: Renaming Data
Replies: 10
Views: 1606

Re: Renaming Data

Actually, I might have enough sample data. Had to guess on a few things, though, which means that there are more assumptions than I would like. ::------------------------------------------------------------------------------ :: ASSUMPTIONS :: - This script is located inside of the main folder that c...
by ShadowThief
18 Oct 2018 01:16
Forum: DOS Batch Forum
Topic: Renaming Data
Replies: 10
Views: 1606

Re: Renaming Data

Squashman wrote:
17 Oct 2018 15:50
Lets hope someone takes the time to do it.
Ordinarily I would, but I still don't have enough sample data.
by ShadowThief
09 Oct 2018 12:18
Forum: DOS Batch Forum
Topic: Text File Encoding ANSI to UTF-8
Replies: 3
Views: 1251

Re: Text File Encoding ANSI to UTF-8

The easiest way (short of opening the file with a text editor and saving it manually) is probably with ConvertCP.exe. Beyond that, my next thought would be to add the UTF-8 BOM to the front of the text file, but that might not be the best solution for some circumstances.
by ShadowThief
07 Oct 2018 12:47
Forum: DOS Batch Forum
Topic: Reading file with special characters
Replies: 3
Views: 1297

Re: Reading file with special characters

You can also shorten your original code to @echo off setlocal enabledelayedexpansion for /f "tokens=1-3,*" %%A in (_HashList.tmp) do ( if "%%A"=="MD5" ( set "email_name=%%D" set "email_name=!email_name:~0,-1!" ) else ( if not "%%A"=="CertUtil:" ( set "email_hash=%%A" >>z:\utilities\_HashDatabase.tmp...
by ShadowThief
07 Oct 2018 12:23
Forum: DOS Batch Forum
Topic: Reading file with special characters
Replies: 3
Views: 1297

Re: Reading file with special characters

If you don't mind regenerating the hashfiles, I've thrown together something that will automatically get the MD5 of the emails and put it in the format you wanted without the need for a temporary file. @echo off setlocal enabledelayedexpansion if "%~1"=="" goto :Usage for %%A in (%*) do ( set "email...
by ShadowThief
29 Sep 2018 09:44
Forum: DOS Batch Forum
Topic: Source code for MS-DOS v1.25 and v2.0
Replies: 2
Views: 1521

Re: Source code for MS-DOS v1.25 and v2.0

Fascinating. I wish I spoke assembly.
by ShadowThief
27 Sep 2018 18:56
Forum: DOS Batch Forum
Topic: bin2enc.cmd - Native .CAB & Self-Extracting Scripts
Replies: 10
Views: 3089

Re: MakeCab, CertUtil, & Expand... best file embedding?

Yeah, when I use the script, I generally stick everything in one folder and then just pass that folder as an argument instead of trying to handle multiple files as multiple parameters simultaneously.
by ShadowThief
26 Sep 2018 21:24
Forum: DOS Batch Forum
Topic: For loop doesn't work
Replies: 4
Views: 1297

Re: For loop doesn't work

You recursively unset the hidden attribute on all desktop.ini files on line 5, but then you explicitly specify to only delete hidden files on line 7. Get rid of the /A:H from your del statement and it should work.
by ShadowThief
24 Sep 2018 20:38
Forum: DOS Batch Forum
Topic: bin2enc.cmd - Native .CAB & Self-Extracting Scripts
Replies: 10
Views: 3089

Re: MakeCab, CertUtil, & Expand... best file embedding?

I wrote something a while ago that works reasonably well, but I'm sure somebody will find some edge cases that I missed. ::------------------------------------------------------------------------------ :: Generates a cabinet file from a provided folder that contains all other files :: and subfolders...
by ShadowThief
06 Sep 2018 21:20
Forum: DOS Batch Forum
Topic: Firewall Context Menu
Replies: 3
Views: 1292

Re: Firewall Context Menu

The doctor says to the patient, "What seems to be the trouble?"
Raising his arm, the patient says, "It hurts when I do this."
The doctor says, "Don't do that."