Search found 17 matches

by flywire
18 Jul 2020 05:35
Forum: DOS Batch Forum
Topic: Suppress 1 file(s) copied.
Replies: 2
Views: 2837

Re: Suppress 1 file(s) copied.

Don't worry, you got it. Much appreciated.

Actual use case starts at "(>nul copy ..."
by flywire
18 Jul 2020 03:18
Forum: DOS Batch Forum
Topic: Suppress 1 file(s) copied.
Replies: 2
Views: 2837

Suppress 1 file(s) copied.

Can I suppress the `1 file(s) copied.` output from a single line command that prepending the output from another program?

Code: Select all

>echo demo > new.txt & copy /y new.txt demo.* & vol >> demo.txt
        1 file(s) copied.
(" echo demo > new.txt &" is only to create file for the demonstration.)
by flywire
05 Jun 2018 04:06
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Re: Stop Command Prompt Empty Line

That is your program either writing to stderr or to the console. E:\bat\NestBat>type stub2.bat @for /l %%a in (1, 1, 3) do Program E:\bat\NestBat>stub2 1>stub2.log E:\bat\NestBat>stub2 1>stub2.log 2>nul E:\bat\NestBat> :D Getting there but this is too complex for a user so the redirect needs to go ...
by flywire
04 Jun 2018 16:36
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Re: Stop Command Prompt Empty Line

This is a better test environment. Program runs with one set of input files, it just does the same calculation. Stub1 uses the newly compiled test program. stub.bat @echo off for /l %%a in (1, 1, 5) do Program Screen E:\bat\NestBat>stub> stub.log E:\bat\NestBat>stub1> stub1.log E:\bat\NestBat> stub....
by flywire
04 Jun 2018 04:28
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Re: Stop Command Prompt Empty Line

[edit:] The exe is a licenced commercial program. I have compiled a few programs in different languages and run them through the same batch file but they do not cause the blank line after each run. One attached here: [edit end] Program.zip . I see the forum is busy while I sleep and work. * Forget ...
by flywire
03 Jun 2018 02:58
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Re: Stop Command Prompt Empty Line

sst wrote:
03 Jun 2018 02:09
XY Problem
How so?

* Batch file used for months supplied, original source even generates sample data
* Program is the same as most other line based executables - windows prompt issues a blank line
by flywire
02 Jun 2018 18:00
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Re: Stop Command Prompt Empty Line

This prog.exe will print all these empty lines to your command line. It means the standard output isn't into handle1. No, I think you are wrong. It is a standard exe like any other program. The line comes from the command processor in the shell not the exe. [edit: Tests show the line does come from...
by flywire
02 Jun 2018 10:40
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Re: Stop Command Prompt Empty Line

... @echo off @echo off :: Usage: NestBat [File (without extension) [File (without extension)]] > Batling.bat :: :: Ver 15/02/2018 (CC BY-SA 4.0) :: echo Generating ... :: For %%f in (%1*.dat) do ( echo :: echo ::*** %%f echo copy %%f DAT echo copy %%f.dta DTA echo copy %%f.dtt DTT echo :: :: For %...
by flywire
02 Jun 2018 05:41
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16368

Stop Command Prompt Empty Line

I process thousands of files in a batch file with prog.exe (which I didn't write) and redirect output from the batch file to a log file. Each time the program is called the command processor prints a blank line to the shell. I found https://superuser.com/a/97308/514126 > set /p x=foo<nul foo > _ Whe...
by flywire
20 Feb 2018 07:24
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 61
Views: 92024

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

I am totally lost as to your questions about HASHSUM, errorlevels, and pipes. I don't understand what your concerns are. I don't understand why I can't process all lines in the batch file. My demo UpdateManifest.bat failed: Say this example: C:\Users\User\Code\NestBat>type ..\updatemanifest.bat :: ...
by flywire
19 Feb 2018 06:43
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 61
Views: 92024

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

I'm specifically interested in a solution to use in a batch file to verify files being used in the batch file. I realise now hashsum is not a simple batch file. Dave - Can you comment on any problems with calling hashsum from within a batch file and reading the errorlevels? eg: call ..\hashsum /T /A...
by flywire
17 Feb 2018 18:22
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 61
Views: 92024

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

If you have a manifest and want to check just one file ... you can use FIND ... Yep, that's the magic one! Can a single entry in the Manifest be inserted or changed leaving the other entries? Not via HASHSUM.BAT ... Happy for you to tidy up these two lines that do most of it: find /v /i "NestBat.ba...
by flywire
17 Feb 2018 05:25
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 61
Views: 92024

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

http://www.cool-smileys.com/images/280.gif Very nicely implemented - Well done. C:\Users\User\Code\NestBat>..\hashsum /c hashsum <nestbat.bat ---------- "hashsum" ---------- OK: batling.bat OK: NestBat.bat ========== SUMMARY ========== Total manifests = 1 Matched files = 2 Can the single file be ve...
by flywire
17 Feb 2018 02:37
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 61
Views: 92024

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

The Windows CERTUTIL command ... it is not very convenient ... : CERTUTIL delimits hex pairs with spaces, whereas md5sum etc. uses a continuous stream of hex digits. ... Has it changed in Win10? C:\Users\User\Code\NestBat>certutil -hashfile NestBat.bat SHA1 hash of NestBat.bat: fc5650b221ed08b5403c...
by flywire
15 Feb 2018 21:29
Forum: DOS Batch Forum
Topic: Fumbling a Nested Batch File
Replies: 5
Views: 5624

Re: Fumbling a Nested Batch File

Thanks Steffen - the previous failure of %%%% must have been another issue and I missed the %~dpnf - :D cool!

Any advice on redirecting the output to a file from the command line but forcing messages (eg done.) to the console?