Search found 4080 matches

by Squashman
22 Jan 2021 11:49
Forum: DOS Batch Forum
Topic: A script making it easy to set a variable with the output of a command
Replies: 2
Views: 33

Re: A script making it easy to set a variable with the output of a command

The very first comment you make is about the nesting of commands to use as input to another command. This really doesn't solve that problem unless I am not understanding how to use your program to do that.
by Squashman
17 Jan 2021 23:04
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 60
Views: 36229

Re: HASHSUM.BAT v1.6 - emulate md5sum, shasum, and the like

balubeto wrote:
17 Jan 2021 09:50
How do I incorporate the andresp code into the main script as well?

Thanks

Bye
I am going to take a wild guess and say download the code that andresp posted
by Squashman
16 Jan 2021 22:23
Forum: DOS Batch Forum
Topic: Windows 10 20H2 and hash file
Replies: 3
Views: 166

Re: Windows 10 20H2 and hash file

Hi Using Windows 10 20H2, how can I create a script that, starting from a local or network directory, parses all its subdirectories creating a text file containing all the file names with the corresponding SHA1 hashes next to them? Thanks Bye Almost 10 years on these forums and you still pretty muc...
by Squashman
15 Jan 2021 18:37
Forum: DOS Batch Forum
Topic: save text file contents into a temporary variable and echo it only if that text file is modified
Replies: 2
Views: 141

Re: save text file contents into a temporary variable and echo it only if that text file is modified

This question seems to have something to do with your previous question.

Are you just trying to TAIL a file?
by Squashman
14 Jan 2021 17:20
Forum: DOS Batch Forum
Topic: How to write REM Comments in a new file
Replies: 4
Views: 184

Re: How to write REM Comments in a new file

To cut down on the amount of code you could do this. ( echo REM QBFC Project Options Begin echo REM HasVersionInfo: No echo REM Companyname: echo REM Productname: echo REM Filedescription: echo REM Copyrights: echo REM Trademarks: echo REM Originalname: echo REM Comments: echo REM Productversion: 1....
by Squashman
13 Jan 2021 12:43
Forum: DOS Batch Forum
Topic: login to website in script
Replies: 2
Views: 170

Re: login to website in script

Matt Williamson wrote:
13 Jan 2021 07:52
Since search is broken,
I don't have an answer for your question but you do know you can use Google to search the site. Most of the time that is what I use because it is better at indexing the site then using the site search. Just append this to the end of your Google Search: site:dostips.com
by Squashman
09 Jan 2021 17:57
Forum: DOS Batch Forum
Topic: Start, wait, start, wait till exit, then start batch file?
Replies: 3
Views: 249

Re: Start, wait, start, wait till exit, then start batch file?

Some programs will not respect the wait option of the START command. In your instance you really don't need use the START command at all.
by Squashman
08 Jan 2021 10:52
Forum: DOS Batch Forum
Topic: Creating a copy of a full directory path....
Replies: 3
Views: 298

Re: Creating a copy of a full directory path....

Well, I got a script working that pretty much does what I want. See below: @echo off REM Go to your target folder and drag a file from it onto the batch file to activate the script. REM Change the drive letter of the destination path below in destdrive. set "destdrive=E:\" REM The line below grabs ...
by Squashman
07 Jan 2021 22:18
Forum: DOS Batch Forum
Topic: How to sum digits of a number
Replies: 2
Views: 285

Re: How to sum digits of a number

Code: Select all

@echo off
setlocal
SET "number=7292"
set "sum=0"
for /F "delims=" %%G IN ('cmd /u /c "echo %number%"^|find /V ""') do (
    set /A sum+=%%G
)
echo SUM IS: %sum%
endlocal
pause
Output

Code: Select all

C:\Users\Squashman\Desktop>sum.bat
SUM IS: 20
Press any key to continue . . .
by Squashman
07 Jan 2021 22:11
Forum: DOS Batch Forum
Topic: Creating a copy of a full directory path....
Replies: 3
Views: 298

Re: Creating a copy of a full directory path....

I know I can get the current folder path by using % arguments in the batch files That is all you need. Just use the command modifiers as described in the help file for the CALL and FOR commands. Substitution of batch parameters (%n) has been enhanced. You can now use the following optional syntax: ...
by Squashman
07 Jan 2021 13:29
Forum: DOS Batch Forum
Topic: Batch File to edit specific line of Text file
Replies: 58
Views: 4408

Re: Batch File to edit specific line of Text file

You still need an ampersand before the ENDLOCAL.
by Squashman
07 Jan 2021 10:14
Forum: DOS Batch Forum
Topic: Batch File to edit specific line of Text file
Replies: 58
Views: 4408

Re: Batch File to edit specific line of Text file

Terry I found my problem! It was simply the pathing for the ezcad program. The path includes: "C:\Users\ptech\Documents\Ezcad2.14.9(20170509)\EzCad2.exe" the "(20170509)" in the path i believe was causing the problem and crashing or ending the program. Any suggestions for a quick fix besides renami...
by Squashman
07 Jan 2021 10:13
Forum: DOS Batch Forum
Topic: Batch File to edit specific line of Text file
Replies: 58
Views: 4408

Re: Batch File to edit specific line of Text file

Ok actually I still cannot get 2 programs to open up at the same time upon exit. The end objective is to simply open the notepad file "sensor.txt" that was edited and the Ezcad file/program. I can only get one or the other to open why not both? If "%%G"=="E" (start notepad "Sensor Serialization.txt...