Search found 200 matches

by pieh-ejdsch
24 Aug 2019 08:15
Forum: DOS Batch Forum
Topic: mutiple validation in same do not working
Replies: 2
Views: 596

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

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

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

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

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

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

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

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 "
by pieh-ejdsch
22 May 2019 13:36
Forum: DOS Batch Forum
Topic: win98cmd
Replies: 7
Views: 1257

Re: win98cmd

Hi carlos, from CD: security9_deu Microsoft Windows 2000 [Version 6.02.9200] (C) Copyright 1985-2000 Microsoft Corp. cmd.exe 249.104 bytes 19.06.2003 12:05 CRC32 96AE93D7 W2K_SP4_DE_cmd_exe.rar I actually found a bit (time). Well, gold dust. I had ordered this one at Microsoft. Windows Security Upda...
by pieh-ejdsch
13 May 2019 10:35
Forum: DOS Batch Forum
Topic: what regular of conversion of special characters under enable delayed expansion is
Replies: 2
Views: 558

Re: what regular of conversion of special characters under enable delayed expansion is

Hallo sincos2007, there are a few more options: temp1.txt abc %%var1%% !^!!var2 ^!^!^mmm !^mmm !var3 !^!^!varNotdefined !.! _neverVar !^^!- specialC.cmd @echo off pushD "%~f0\.." :test1 setlocal set "var1 =expanded001 " set "var2 =expanded002 " set "var2 ^=002andEcspe " set "^=escapeOnly " set "^^=e...
by pieh-ejdsch
03 May 2019 14:55
Forum: DOS Batch Forum
Topic: En/Decryption of file with array variables.
Replies: 2
Views: 464

Re: En/Decryption of file with array variables.

Hallo triggerer, For each new line that you read, you should delete the variable that provides the output encoding for the single letter. Otherwise you will get the previous out in the next out. Furthermore, you should pay attention to it, if the single character can not be de / encoded it may NOT b...
by pieh-ejdsch
01 May 2019 08:06
Forum: DOS Batch Forum
Topic: SET variable and MKDIR in one line? Automate a process
Replies: 7
Views: 927

Re: SET variable and MKDIR in one line? Automate a process

The first loop is actually only intended to reuse another variable which is generated in a caller loop. Since you are now using a loop in the called function yourself, you basically do not need the first loop anymore. But since you get the message about the index only once, this variable will contin...
by pieh-ejdsch
01 May 2019 00:16
Forum: DOS Batch Forum
Topic: Hard link in batch
Replies: 11
Views: 1813

Re: Hard link in batch

Hallo nickodemos, does not it make sense to fold the folders with the links somewhere else than a directory deeper? An example of how the links are used as a summary in a seperate folder you can find here? with linked Folders Something else @echo off setlocal REM store current directory. Using separ...
by pieh-ejdsch
22 Apr 2019 06:01
Forum: DOS Batch Forum
Topic: Help with simple code
Replies: 1
Views: 490

Re: Help with simple code

Hallo AlbRodriguez, this is certainly due to the number of lines. From 65534 lines you need a confirmation with the space bar for each of the next 65534 lines. The creation of a temporary file can not be avoided. But you can bypass the keypress. As many small files are created as are needed until th...
by pieh-ejdsch
21 Apr 2019 00:00
Forum: DOS Batch Forum
Topic: SET variable and MKDIR in one line? Automate a process
Replies: 7
Views: 927

Re: SET variable and MKDIR in one line? Automate a process

Hallo TMC, I have to admit - I had to read the text five times to understand what you want. Now I'm behind it. You use a for /f loop to go through the table. Go to a sub. Work with the help of a second loop and do not need to define a variable extra. for /f "usebackQ tokens=1,* delims=," %%i in ("c:...