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 in cmd window: fsutil behavior query encryptpagingfile To enable encryption: fsutil behavior set encryptpagingfile 1 […]
If you are wondering why and how Windows Vista or Windows 7 non English versions show different names for ‘Program Files’ folder using Windows Explorer and cmd.exe. The answer is Desktop.ini file hidden inside the folder: [.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21781 This tells Windows Shell (Explorer) to show localized name instead of English ‘Program Files’.
To get file size using batch file, we use variable with modifier. Then set /a, performs match operation (divide by 1024). Unlike other examples, this example works on any Windows language. @echo off :: Name: file_size.bat :: Author wishmesh.com :: Calculate file size in KB from %1 set /a size = %~z1 / 1024 echo […]