Search found 128 matches
- 27 Dec 2017 04:17
- Forum: DOS Batch Forum
- Topic: Why use > at beginning of command line
- Replies: 9
- Views: 7890
Re: Why use > at beginning of command line
just a side note, any time a redirection is used within a block, the system opens and closes the file (or stream). for %%I in .... ( >>"somefile.txt" echo %%I ) but >>"somefile.txt" ( for %%I in .... ( echo %%I ) ) Opens the file/stream, processes all commands in the block, and then close the file/s...
- 19 Dec 2017 03:28
- Forum: DOS Batch Forum
- Topic: Generating .pdf files with batch?
- Replies: 42
- Views: 38363
Re: Generating .pdf files with batch?
Just a note about https://www.dostips.com/forum/viewtopic.php?p=55088#p55088 c:\>set "sDate=. " <----- note a space after the dot. c:\>set "iDate=1" c:\>for /F "tokens=1-6 delims=. :.," %a in ("18. 12. 2017,13:36:29,01") do ( if 1 == 0 (set mm=%a & set dd=%b & set yy=%c ) else if 1 == 1 (set dd=%a &...
- 09 Oct 2017 02:53
- Forum: DOS Batch Forum
- Topic: BLAT - Unable to configure
- Replies: 7
- Views: 7555
Re: BLAT - Unable to configure
NO, it doesn't. But, this link may help
USING BLAT, STUNNEL AND GMAIL TOGETHER
USING BLAT, STUNNEL AND GMAIL TOGETHER
- 13 Sep 2017 04:10
- Forum: DOS Batch Forum
- Topic: How to make multiple variable acceptable while whitelisting any other variable?
- Replies: 2
- Views: 2705
Re: How to make multiple variable acceptable while whitelisting any other variable?
Whenever you must evaluate two variables to boolean logic between them @echo off setlocal set /p var1="Val1, enter true or false: " set /p var2="Val2, enter true or false: " rem test AND if "%var1%"=="true" if "%var2%"=="true" ( echo/&e...
- 28 Aug 2017 05:58
- Forum: DOS Batch Forum
- Topic: Alignment using batchscript
- Replies: 8
- Views: 8748
Re: Alignment using batchscript
for the sake of speed... //>nul 2>nul||@goto :batch_code /* :batch_code @echo off rem place desired exe name set "theExeFile=myParser.exe" set "inputFile=.\input.txt" set "outputFile=.\output.txt" if not exist "%theExeFile%" call :build_the_exe || exit/B echo ...
- 23 Aug 2017 06:07
- Forum: DOS Batch Forum
- Topic: Creating a While Loop in Batch | Batch Basics
- Replies: 5
- Views: 31919
- 22 Aug 2017 11:29
- Forum: DOS Batch Forum
- Topic: Colorful animation using VT100 - Pure batch WIN 10 only
- Replies: 7
- Views: 8252
Re: Colorful animation using VT100 - Pure batch WIN 10 only
Antonio, did you ever tried ansicon? http://ansicon.adoxa.vze.com/
- 21 Aug 2017 10:00
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 7791
Re: changing a 'Column' in a tab-delimited text File
Ok I noticed the problem with both of you codes, they don't allow for a empty/null column entry. Is there any way to fix this? Then, you need a workaround, @echo off SetLocal EnableExtensions EnableDelayedExpansion rem get sure here is the tab character (my text editor is set to change tabs into sp...
- 18 Aug 2017 04:08
- Forum: DOS Batch Forum
- Topic: How to open a CMD Window at a specified location on the Desktop?
- Replies: 15
- Views: 30652
- 18 Aug 2017 02:44
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 7791
Re: changing a 'Column' in a tab-delimited text File
My fault, I didn't read carefully. I've seen a delimiter and assumed they were all the same. Then, this should do the job, as the only valid delimiter is tab.
- 17 Aug 2017 09:00
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 7791
Re: changing a 'Column' in a tab-delimited text File
I have a very large tab-delimited text file with 4 columns and many rows. I want a batch file to replace the third tab on each row with a colon. Here is an example of input and desired output: input(always 4 columns): username[tab]firstname[space]lastname[tab]email[tab]number username[tab]firstname...
- 16 Aug 2017 04:29
- Forum: DOS Batch Forum
- Topic: commands to change CmdPrompt buffer size?
- Replies: 9
- Views: 11186
Re: commands to change CmdPrompt buffer size?
Very impressive. I had to explore. I took your DOS powershell command out of context to try to understand this magic. your FOR construct seems to run %psCmd% in a way that hides the output. That consists of error messages about not being able to update the system variable $host. Yet the routine wor...
- 11 Aug 2017 04:39
- Forum: DOS Batch Forum
- Topic: commands to change CmdPrompt buffer size?
- Replies: 9
- Views: 11186
Re: commands to change CmdPrompt buffer size?
Don't know nothing about Win 10, but here (Win8) under HKEY_CURRENT_USER\Console key, you may find ScreenBufferSize 0x012c0050 WindowSize 0x00190050 Both are DWORD values, where hiword is lines and loword is columns. So ScreenBufferSize.Lines is 0x012c (decimal 300) and ScreenBufferSize.Columns is 0...
- 09 Aug 2017 04:02
- Forum: DOS Batch Forum
- Topic: Extracting substrings from strings
- Replies: 4
- Views: 6355
Re: Extracting substrings from strings
This should be enhanced (is slow) but does the work. @echo off SetLocal EnableExtensions EnableDelayedExpansion set "input=input.txt" set "output=output.txt" rem needed to show progress set/a cnt=0 for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E & echo on ...
- 02 Aug 2017 09:24
- Forum: DOS Batch Forum
- Topic: trim off some characters of lines in txt file
- Replies: 5
- Views: 5483
Re: trim off some characters of lines in txt file
echo !line:~6,16! can be call echo %%line:~6:16%% note double percent sign to force call evaluate the term inside. but performance will be worst than using delayed expansion (think about a large file to process) also, if performance is in your mind for ... do ( echo whatever>>somefile.txt ) will op...