Monthly Archives: October 2014

10 Incredibly Simple Things You Should Be Doing To Protect Your Privacy

http://www.forbes.com/sites/kashmirhill/2012/08/23/10-incredibly-simple-things-you-should-be-doing-to-protect-your-privacy/ https://securemail.hidemyass.com/

Posted in Uncategorized | Tagged , | 1 Comment

Logical operators (“and”, “or”) in DOS batch

You can do and with nested conditions: if %age% geq 2 ( if %age% leq 12 ( set class=child ) ) or: if %age% geq 2 if %age% leq 12 set class=child You can do or with a separate variable: … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Use sed to edit xml file

General usage of GNU sed on Windows sed -i -e “s|what|replacewith|g” file -i replaces the original file -e runs expression s|what|replacewith|g replaces all / globally what occurrences with replacewith You can avoid g if you want to stop at the … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

MSDOS operators for multiple commands

MSDOS operators for multiple commands Command A & Command B Execute Command A, then execute Command B (no evaluation of anything) Command A | Command B Execute Command A, and redirect all its output into the input of Command B … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

How to list all files that does not contain a pattern (i.e. string) ?

How to list all files that does not contain a pattern? LIST all csproj files that does not contain certain string (i.e. BUILD_TSM_VERSION) @for /r %f in (*.csproj) do @find “BUILD_TSM_VERSION” “%f” > nul || echo %f @for /r %f … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

How to delete recursively all directories inside a folder?

The for command can use /r for recursive /d is for directory type /f is for files Also, you can use @for and @rd to skip printout to console. DELETE all bin* directories for /r /d %d in (bin*) do … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment