very quickly getting total size of folder

You are at a disadvantage. Windows Explorer almost certainly uses FindFirstFile/FindNextFile to both traverse the directory structure and collect size information (through lpFindFileData) in one pass, making what is essentially a single system call per file. Python is unfortunately not your friend in this case. Thus, os.walk first calls os.listdir (which internally calls FindFirstFile/FindNextFile) any … Read more

Compare 2 directories in windows [closed]

The following PowerShell code compares the file listings of two folders. It will detect renamed or newly created files and folders, but it will not detect modified data or different timestamps: $dir1 = Get-ChildItem -Recurse -path C:\dir1 $dir2 = Get-ChildItem -Recurse -path C:\dir2 Compare-Object -ReferenceObject $dir1 -DifferenceObject $dir2 Source: MS Devblog – Dr. Scripto 3rd … Read more

Getting current directory in VBScript

You can use WScript.ScriptFullName which will return the full path of the executing script. You can then use string manipulation (jscript example) : scriptdir = WScript.ScriptFullName.substring(0,WScript.ScriptFullName.lastIndexOf(WScript.ScriptName)-1) Or get help from FileSystemObject, (vbscript example) : scriptdir = CreateObject(“Scripting.FileSystemObject”).GetParentFolderName(WScript.ScriptFullName)

How to make g++ search for header files in a specific directory?

A/code.cpp #include <B/file.hpp> A/a/code2.cpp #include <B/file.hpp> Compile using: g++ -I /your/source/root /your/source/root/A/code.cpp g++ -I /your/source/root /your/source/root/A/a/code2.cpp Edit: You can use environment variables to change the path g++ looks for header files. From man page: Some additional environments variables affect the behavior of the preprocessor. CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH Each variable’s value is a list of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)