Search found 18 matches
- 28 Oct 2023 12:57
- Forum: DOS Batch Forum
- Topic: new functions: :chr, :asc, :asciiMap
- Replies: 35
- Views: 189795
Re: new functions: :chr, :asc, :asciiMap
Found this on Github... :: CharLib.bat is a callable library of batch functions used to interconvert :: between characters and numeric ASCII code values. :: :: syntax: :: :: [call] [path]CharLib function [arguments] :: :: For a full list of available functions use: :: :: CharLib help :: :: For detai...
- 25 Oct 2023 07:56
- Forum: DOS Batch Forum
- Topic: Adding a new DosKey command
- Replies: 4
- Views: 15990
Re: Adding a new DosKey command
Maybe use this as a starting point; U:\>echo Disk Volume & echo. ----------- & ((echo list volume | diskpart) | findstr "Volume ###") Disk Volume ----------- Volume ### Ltr Label Fs Type Size Status Info Volume 0 D DVD-ROM 0 B No Media Volume 1 C NTFS Partition 465 GB Healthy Boot Volume 2 NTFS Part...
- 10 Jan 2023 15:36
- Forum: DOS Batch Forum
- Topic: Converting from bytes to gigabytes in multiple division statements.
- Replies: 3
- Views: 10874
Re: Converting from bytes to gigabytes in multiple division statements.
I have found a batch file to do what you want.
It is available via PasteBin;
https://pastebin.com/hrDVeeU1
Note that the result is not instantaneous.
Please advise if this solution solves your problem.
Joe
Code: Select all
R:\>str_math.bat 30417637376 / 1024
29704724
https://pastebin.com/hrDVeeU1
Note that the result is not instantaneous.
Please advise if this solution solves your problem.
Joe
- 10 Jan 2023 15:21
- Forum: DOS Batch Forum
- Topic: Converting from bytes to gigabytes in multiple division statements.
- Replies: 3
- Views: 10874
Re: Converting from bytes to gigabytes in multiple division statements.
Rob van der Woude has a page that explains Math in NT Batch Files
https://www.robvanderwoude.com/battech_math.php.
There is a section on that page titled "Workarounds: 32-bit"
Rob offers three workarounds for your problem.
Joe
https://www.robvanderwoude.com/battech_math.php.
There is a section on that page titled "Workarounds: 32-bit"
Rob offers three workarounds for your problem.
Joe
- 05 Jan 2023 07:59
- Forum: DOS Batch Forum
- Topic: HTA GUI build
- Replies: 5
- Views: 27581
Re: HTA GUI build
If you are looking for a HTA GUI Design Tool, I use WYSIWYG Web Builder; https://www.wysiwygwebbuilder.com/ After designing the HTA document via the WYSIWYG Web Builder, I can then save the design as an .hta file. There are other HTA GUI Designers, but I have the paid version, and it works for what ...
- 05 Jan 2023 07:19
- Forum: DOS Batch Forum
- Topic: HTA GUI build
- Replies: 5
- Views: 27581
Re: HTA GUI build
Rob van der Woude has an example that might be helpful; https://www.robvanderwoude.com/hardware.php Source code for hardware.hta https://www.robvanderwoude.com/sourcecode.php?src=hardware_hta How to create HTAs https://www.robvanderwoude.com/vbstech_hta.php HTA Examples https://www.robvanderwoude.co...
- 07 Dec 2022 08:30
- Forum: DOS Batch Forum
- Topic: DOS search for file contents? Like Grep
- Replies: 2
- Views: 8978
Re: DOS search for file contents? Like Grep
Not sure if this is a solution for you or not. According to documentation at https://ss64.com/nt/setx.html When using SetX to extract values from a file, we can ignore the variable that is set and instead use FOR /F to grab the extracted token text into the current session. In this way we are using ...
- 15 Nov 2021 18:18
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
I ran your code as-is, and it worked on my Windows 10 system. Try the following; @echo off :prompt echo Deploy as... [Receiver, Sender, eoj] set /p resen=">" if %resen%==Receiver cmd.exe /c e:\utils\Client.cmd if %resen%==Sender cmd.exe /c e:\utils\Server.cmd if %resen%==eoj exit /b if not %resen%==...
- 15 Nov 2021 07:49
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
I found a post I made a while back on how I use WAITFOR.EXE from TCC (Take Command Console from JPSoft.com) and VBScript.
This could also be made to work with cmd.exe, instead of tcc.exe
Joe
Ref: https://jpsoft.com/forums/threads/waitf ... nge.10403/
This could also be made to work with cmd.exe, instead of tcc.exe
Joe
Ref: https://jpsoft.com/forums/threads/waitf ... nge.10403/
- 14 Nov 2021 08:58
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
From a cmd.exe window; e:\utils>server.cmd Enter a message on the next line. >This is a test server.cmd just created the file r:\temp\Message.txt Waiting for client.cmd to signal that they have read the file. From a second cmd.exe window; e:\utils>client.cmd Display the contents of r:\temp\message.t...
- 13 Nov 2021 19:41
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
Open up a cmd.exe window, and type echo %computername%. Here's what it displays on my Windows 10 system; e:\utils>echo %computername% DESKTOP-H2JFFTF This says that the name of my system is DESKTOP-H2JFFTF Visit the SS64 site; https://ss64.com/nt/waitfor.html Scroll down to the bottom of that page. ...
- 12 Nov 2021 20:05
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
From Windows 10, launch two cmd.exe windows. From the first cmd.exe window, type; WaitFor Complete In the second cmd.exe window, type; WaitFor /SI Complete You have now sent a signal from one cmd.exe window to a second cmd.exe window using WaitFor e:\utils>waitfor /? WaitFor has two ways of working:...
- 12 Nov 2021 19:35
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
If you read the information contained in the links that I posted, your question will be answered.
Examples are given which show how to send the signal from one computer to another computer.
Joe
Examples are given which show how to send the signal from one computer to another computer.
Joe
- 12 Nov 2021 06:45
- Forum: DOS Batch Forum
- Topic: How to communicate from one computer to another in Batch
- Replies: 11
- Views: 12159
Re: How to communicate from one computer to another in Batch
Take a look at the Waitfor command. Do a search of Waitfor on this forum. https://www.dostips.com/forum/search.php?keywords=waitfor Ref: https://ss64.com/nt/waitfor.html Microsoft: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc731613(v=ws.11)#exa...
- 25 Oct 2021 19:25
- Forum: DOS Batch Forum
- Topic: check for updates option
- Replies: 8
- Views: 7683
Re: check for updates option
As curl.exe comes with Windows 10, I use it to check the Last-Modified date of a file before I download said file.
Example;
Joe
Example;
Code: Select all
e:\utils>curl --head --insecure --silent "https://www.nirsoft.net/utils/csvfileview-x64.zip" | find "Last-Modified"
Last-Modified: Fri, 27 Aug 2021 12:37:30 GMT