Tag Archives: cmd

Underused features of Windows batch files

StackOverflow have another interesting topic about: Underused features of Windows batch files. Of course there are many things I didn’t know about. Some highlights: PUSHD path Takes you to the directory specified by path. POPD Takes you back to the … Continue reading

Posted in OS, Programming | Tagged , , , | 2 Comments

How to delete all folders in current directory

How to delete all folders in current directory using command line (cmd.exe) or batch files? How to delete all empty directories in current folder: FOR /D %f IN (*.*) DO RD “%f” How to delete all directories / folders in … Continue reading

Posted in OS, Programming | Tagged , , , | Leave a comment

How to remove hibernation file on Windows 7

Open elevated command prompt (start – type “cmd” – right click – Run as administrator). In command prompt: powercfg -h off Now you can delete hiberfil.sys file, if it is not deleted automatically. To enable hibernation back, use: powercfg -h … Continue reading

Posted in Computers, OS | Tagged , | Leave a comment

Encrypt Windows swap file

Beginning from Windows Vista and Windows Server 2008 it is possible to encrypt Windows paging file. Paging file can contain your credentials, passwords, session data, temporary data from database, etc. To check if encryption is enabled use the following command … Continue reading

Posted in Computers, OS | Tagged , , , , | Leave a comment

Batch script to test if folder / directory is empty

Yesterday I needed a Dos batch script to check if folder is empty. A little Google search revealed some methods: Using dir and find commands, does not work on non-english Windows versions: www.computing.net Using dir command with /a-d, does not … Continue reading

Posted in OS, Programming | Tagged , , , , , | 13 Comments