dos

Generate a M3U file per folder

Tag(s):

REM Description: Generate a M3U file per folder.
REM   -You need to change "C:\Your\MP3\folder\path\" to match your folder path.
REM   -Multilingual is limited by DIR command.
REM Requirements: -You need SED installed.
 

Loops

Tag(s):

Infinite loop using GOTO

@ECHO OFF
 
:Loop
 
ECHO Infinite loop. Ctrl+c to stop.
 
GOTO Loop

Conditional loop using GOTO

Opening a new command prompt window within a batch script

Tag(s):

@REM Open a new window & display "Hello, world".
START cmd /k "echo Hello, world"

@REM Open a new window & execute multiple line of commands".

Padding zeros

Tag(s):

@ECHO OFF
 
SET i=1

Read input from file

Tag(s):

Reading simple input from file

Rename filenames without special characters

Tag(s):

REM *******************************************************************************
REM Description: Rename filenames(*.pdf and *.xls) without 
REM               specials characters(e.g. spaces, double underscores).

Simulate Sleep command

Tag(s):

Sleep for 10 seconds.

String Manipulation

Tag(s):

String Substitution

Take screenshots forever

Tag(s):

@ECHO OFF

REM ******************************************************************************
REM Description: This script will take screenshots every 10 seconds forever.
REM              Screenshots are saved into sc_[Date]_[Time].png.

Using ECHO command

Tag(s):

REM Don't display the command lines.
@ECHO OFF
 
SET username=xuan.ngo

REM Escape < and >.
REM In output.txt: <xuan.ngo@openwritings.net>

Pages

Subscribe to RSS - dos