Search found 207 matches

by pieh-ejdsch
03 Nov 2019 15:38
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.6 - emulate md5sum, shasum, and the like
Replies: 32
Views: 15909

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

In the beginning of your script you only need to insert a single line to use the Variable Path correctly. therefore they do not have to introduce paths to any find.exe.

Code: Select all

call set  path=%%WINDIR%%\system32;%%path%%
by pieh-ejdsch
03 Nov 2019 11:20
Forum: DOS Batch Forum
Topic: [Solved] hELP
Replies: 5
Views: 1116

Re: hELP

Please can you adjust your problem in the contribution description? "Help" is not helpful ... I'm not sure if this script meets your requirements. If you want to compare such a large number of files of the same size, you will make much better progress with the file hash. According to their thread fr...
by pieh-ejdsch
22 Oct 2019 20:56
Forum: DOS Batch Forum
Topic: [Solved] hELP
Replies: 5
Views: 1116

Re: hELP

hallo, The variable, _filesize is too long all the same size filenames are entered in one for each size. This means there are very many (600) files of the same size that contain different content. The length of the name is about 6 characters. I would design the script to create a list per file size ...
by pieh-ejdsch
19 Oct 2019 00:56
Forum: DOS Batch Forum
Topic: How to do change "Terminate batch job (Y/N)?"
Replies: 7
Views: 1649

Re: How to do change "Terminate batch job (Y/N)?"

Hallo Userdosfx, I do not know what you exactly want. I hope you know exactly what you want. Describe at least what you plan and what should be different. Do you want to abort the script and suppress the message? Do you want to pause - then use the pause command or the pause key. https://administrat...
by pieh-ejdsch
15 Oct 2019 09:54
Forum: DOS Batch Forum
Topic: use the output automatically
Replies: 1
Views: 1215

Re: use the output automatically

hello hdgmbh, you can try looks for ONE used com port. or outputs the com port of the device to be connected. @echo off echo looks for ONE used com port. echo or outputs the com port of the device to be connected. setlocal enabledelayedexpansion set prompt=$G$S set "exclude=;" set "include=;" call :...
by pieh-ejdsch
08 Oct 2019 12:21
Forum: DOS Batch Forum
Topic: Really uexpected result of a script
Replies: 3
Views: 1502

Re: Really uexpected result of a script

Hello Szecska,

You want to try a Variable of for loop.
Then take %%U or %%~U or %%~zU.
The output from the dir command is without quotes, so they should be used on both sides in comparison.

Phil
by pieh-ejdsch
06 Oct 2019 05:39
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 2638

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

Hi, At that time I had simply forgotten an endlocal which I had now inserted. Therefore, the pairs should always be turned on and off exactly. Of course, here it goes. @echo off @set prompt=$g$s if . equ .!! setlocal disabledelayedexpansion rem Anwendung ohne Dateiname set program= echo Verarbeite :...
by pieh-ejdsch
24 Aug 2019 08:15
Forum: DOS Batch Forum
Topic: mutiple validation in same do not working
Replies: 2
Views: 1393

Re: mutiple validation in same do not working

Hello,
closing parenthesis is a special character.
Try to Escape every special character with a caret.

Code: Select all

echo( (this^) ^& that ^<are^> "escaped" ^| signs
Phil
by pieh-ejdsch
24 Aug 2019 07:56
Forum: DOS Batch Forum
Topic: Batch Script : Space issue with text file to remove
Replies: 1
Views: 1660

Re: Batch Script : Space issue with text file to remove

hallo,
use a real token (1st)

Code: Select all

for /F " skip=1 tokens=1,2 delims=;" %%a in (%file% ) do if "%%b" NEQ "" (
  echo %%b
) else echo EMPTY
Phil
by pieh-ejdsch
13 Jul 2019 06:43
Forum: DOS Batch Forum
Topic: Calling a bat file with a parameter
Replies: 3
Views: 2302

Re: Calling a bat file with a parameter

Your adminscript gets not the variable params but 'params '.
But neither 'params ' nor 'params' are so usable within a command line.
by pieh-ejdsch
11 Jul 2019 01:14
Forum: DOS Batch Forum
Topic: batch to rename dir / sudir and files
Replies: 3
Views: 2352

Re: batch to rename dir / sudir and files

hello nmareis, use the error message of find. :Upper REM "@echo off echo. set /p "dir=Enter the directory: " pushd "%dir%" for /f "delims=" %%i in (' dir /b 2>nul ') do for /f "tokens=2 delims=\" %%j in (' 2^>^&1 find "" "\%%i\.." ') do ren "%%i" "%%j" popd exit /b" :Exit Exit Top this only print th...
by pieh-ejdsch
06 Jun 2019 14:41
Forum: DOS Batch Forum
Topic: Copying Single Source to Multiple Destinations in Parallel
Replies: 4
Views: 1926

Re: Copying Single Source to Multiple Destinations in Parallel

I changed line 5 Call: nextcopy ... (comes from when you write from the phone.) Of course it makes no sense to send the data over the network several times. Maybe a batch can be started from the server / network in order not to resend the data from the client. To start with a trigger for automatic e...
by pieh-ejdsch
06 Jun 2019 08:28
Forum: DOS Batch Forum
Topic: Copying Single Source to Multiple Destinations in Parallel
Replies: 4
Views: 1926

Re: Copying Single Source to Multiple Destinations in Parallel

You can reduce the scenario to 2 times. Divide and conquer. After each copy you have twice as many sources. Now you copy from two different sources to two different destinations. The fast source serves the fast target. You first make a full copy to the fastest disk. like this setlocal if %1. == :nex...
by pieh-ejdsch
05 Jun 2019 07:41
Forum: DOS Batch Forum
Topic: Check if a batch completed successfully (and was not closed by the user.
Replies: 8
Views: 2243

Re: Check if a batch completed successfully (and was not closed by the user.

Do you want to know if your file is still being read out or created? There is error correction and error detection. The detection can be done with a file comparison. You can make a copy gradually in the process and compare it with the original with FC. The next option is to count the characters befo...
by pieh-ejdsch
26 May 2019 11:13
Forum: DOS Batch Forum
Topic: Need help with command line string replacement
Replies: 3
Views: 1947

Re: Need help with command line string replacement

hello,
try this:

Code: Select all

@="cmd /c pushD \"C:\\Program Files (x86)\\Google\\Chrome\\Application\\\" & for /f \"tokens=1,2*delims=:.\" %%i in (\"%1\") do for /f \"tokens=1-3delims=?#\" %%a IN (\"%%i:// www.%%k\") DO (if \"%~x1\"==\".php\" (chrome.exe %%a#%%c?%%b) else (chrome.exe %1) )&popD "