DOS prompt batch

Was trying out something on batch file, quite interesting though has limited features. But would be a quick way to delivery some solutions. Always check what batch can do before want to write a program for it.

Good place to start on batch programming at -> http://www.allenware.com/icsw/icswidx.htm

SET MYLOCATION = C:\Folder

REM A reversible CD command where you can go back where you
REM came from.
pushd %MYLOCATION%

REM check for file existent
if not exist *.txt goto ERROR

for %%file in (*txt) do type "%%file" >> mySingleFile.txt
IF ERRORLEVEL 1 goto ERROR
popd

:ERROR
echo Error occurredEXIT /B 1

Comments

Popular posts from this blog

Outlook : "operation failed, object could not be found. " when trying to close a PST.

How to transfer app and data from old iPhone to new iPhone for model IOS17 and IOS18 above.

Troubleshooting Outlook Express (IMAP, POP3, HTTP, NEWS) with the log file