Search found 919 matches

by ShadowThief
10 Nov 2018 21:51
Forum: DOS Batch Forum
Topic: Batch file password login - different everyday
Replies: 3
Views: 2364

Re: Batch file password login - different everyday

1. Write a script that changes a password stored in a file every time you run it. I'm thinking something that simulates diceware, personally.
2. Create a scheduled task that runs that script once per day.
by ShadowThief
05 Nov 2018 16:36
Forum: DOS Batch Forum
Topic: Replace node value in multiple xml files
Replies: 7
Views: 2159

Re: Replace node value in multiple xml files

That code and sample data gives me the output <fileiddata</fileid>data</fileiddata</fileid>>>abcdef</fileiddata</fileid>data</fileiddata</fileid>>> <city>London</city> <country>UK</country> <year>2018</year> <type>Business trip</type> <filefileiddata</fileid>data</fileiddata</fileid>>>123456</filefi...
by ShadowThief
31 Oct 2018 20:05
Forum: DOS Batch Forum
Topic: My batch Menu
Replies: 9
Views: 1876

Re: My batch Menu

Wow, this is... big. You clearly spent a lot of time on this. I'd recommend looking into the for /L loop, arrays, and functions if you're interested in significantly shrinking your code.
by ShadowThief
28 Oct 2018 19:39
Forum: DOS Batch Forum
Topic: Getting >nul 2>&1 to work within a batch file
Replies: 12
Views: 2127

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

That makes more sense, thanks.
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: 2127

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

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

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

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

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

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

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

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

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

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

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

Fascinating. I wish I spoke assembly.