This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
call :createSub | |
call :echoWithoutLinefeed "=hello" | |
call :echoWithoutLinefeed " world" | |
exit /b | |
:echoWithoutLinefeed | |
> txt.tmp (echo(%~1!sub!) | |
copy txt.tmp /a txt2.tmp /b > nul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=========================================================================== | |
Date: 07-16-93 (23:51) Number: 9499 | |
From: BEN DAVIS Refer#: NONE | |
To: ALL Recvd: NO | |
Subj: The MUF List follows... Conf: DOS6 | |
--------------------------------------------------------------------------- | |
ÿ@ORIGIN :EXECNET N | |
Hi, | |
I've decided to post this list here, due to a few begging messages. I |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set "Var=%Var%@" | |
for /f "delims=" %%A in ('echo(%Var: =^&echo(%') do call set "Var2=%%Var: %%A=%%" | |
set "Var=%Var2%" | |
:: David Ruhmann | |
:: http://www.computerhope.com/forum/index.php/topic,135076.msg869228.html#msg869228 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::**Windows Batch** | |
::This will enumerate every word in a file. | |
@echo off | |
setlocal EnableExtensions DisableDelayedExpansion | |
:: Loop through Lines | |
for /f "delims=" %%A in (lorum.txt) do ( | |
set "_=%%A" | |
call :Expand_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableExtensions DisableDelayedExpansion | |
:: Find and Replace [Works with Special Characters] | |
:: by David Ruhmann | |
:: About | |
:: This is a proof of concept to illustrate the difficulty and limitations in | |
:: regards to the batch string replacement functionality. Delayed Expansion was | |
:: not used as an exercise in showing the most common usage of batch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Save this one line of text as file invisible.vbs: | |
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False | |
:: To run any program or batch file invisibly, use it like this: | |
wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat" | |
:: To also be able to pass-on/relay a list of arguments use only two double quotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Gregorian Calendar | |
:: by David Ruhmann | |
:: NOTES: | |
:: Requires date format %Date%="ddd MM/dd/yyyy" to default today's date. | |
:: This is only a proof of concept that may still have some bugs. | |
@echo off | |
:: Example Call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CALFAQ version 1.1, 4 April 2008 | |
* | |
* COPYRIGHT: | |
* These functions are Copyright (c) 2008 by Claus Tondering | |
* (claus@tondering.dk). | |
* | |
* LICENSE: | |
* The code is distributed under the Boost Software License, which | |
* says: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Loop through the paths listed in the PATH evnironment variable | |
for %%A in ("%Path:;=" "%") do @echo %%A | |
:: Do not use setx to set the Path variable, because it will | |
:: truncate the Path string to a maximum of 1024-5 characters. | |
:: This is due to the cmd.exe command line length limitations. |