Robocopy Quirks

Old-fashioned, but I still use batchfiles to automate tasks on my computer. One of them is a backup mirroring script, using the robocopy command. Recently I wanted to add a folder from C:\Program Files\appname\ to the backup, so I added the following line to the backup-script:

Robocopy "C:\Program Files\appname\" "\\SERVER\Backup\LAPTOP\appname\" /MIR /XJD /R:8 /W:15 /MT:32 /BYTES /V /NP /LOG:log-LAPTOP-appname.log

However this did not work, what’s the problem? Who knows… but the solution is to add a space before the closing end-quote. So just use:

Robocopy "C:\Program Files\appname\ " "\\SERVER\Backup\LAPTOP\appname\ " /MIR /XJD /R:8 /W:15 /MT:32 /BYTES /V /NP /LOG:log-LAPTOP-appname.log

On another note, check this, and use (also note the * and not *.* !!!):

"C:\Program Files\7-Zip\7z.exe" u -r -up0q3r2x2y2z1w2 -mx=0 -password Z:\somefile.zip "C:\Somefolder\*"

That’s all folks!
Have a nice day…

ERR_CONNECTION_REFUSED

Website suddenly no longer showing anything?
Might be a DNS cache problem!

How to clear the DNS cache on your computer

This article describes how to clear the DNS cache on your computer.

Many computer operating systems use caching to store DNS lookup results. Normally this is not a problem, and accelerates network performance. However, when you are developing a web site or configuring domain settings, your computer’s DNS cache can get in the way, preventing you from accessing the correct site.

To clear the DNS cache, follow the appropriate procedure below for your computer’s operating system or web browser.

Continue reading ERR_CONNECTION_REFUSED

WordPress Auto Logout

When you click on the “Remember Me” option on the login page of your WordPress website, it will keep you logged in for 2 weeks. If you don’t, it will keep your login active for 2 days. However, you can extend the auto logout period in WordPress by adding a little code snippet. Keep in mind that it will affect site’s security by keeping user logged in for too long.

function keep_me_logged_in_for_1_year($expirein) {
return 31536000; // one year in seconds
}
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );

The above code will keep your authentication cookie for a year.

Have a nice day!