Thursday 22 October 2020

How to Lock Folders in Windows 10 without Software

Code:

@ECHO OFF
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDPrivate
:CONFIRM
echo Are you sure to lock this folder? (Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock Your Secure Folder
set/p "pass=>"
if NOT %pass%== YOUR PASSWORD goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDPrivate
md Private
echo Private created successfully
goto End
:End

Steps to Follow:

1. Copy code to notepad.

2. Replace YOUR PASSWORD with password you want to keep.

3. Save this file in .bat format to the folder you want to lock.

4. Open the .bat file and follow to lock the folder

5. Open the .bat file and follow step to unlock the folder

Wednesday 17 June 2020

Monitoring and fixing 404 errors with Google Analytics

For website with dedicated 404 Page eg. /404/

How to build the report for 404 errors from internal links yourself

  • Go to Customization > Custom Reports in Google Analytics and click on +New Custom Report.
  • Select the report type Flat table.
  • Select the dimensions Page, Previous Page Path and Page Title.
  • Select the metric Unique Pageviews.
  • Add a filter that excludes the value (entrance) for the dimension Previous Page Path. This filter makes sure that only 404 errors that were preceded by a page view on your own website (and thus caused by an internal link) show in the report.
  • Add a Regex filter for the page title that contains the expression that helps you identify your 404 error page (“404” in the example below, but it could also be “page not found” or something else, depending on the title tag of your 404 error page).

How to build the report for 404 errors from external links yourself

  • Go to Customization > Custom Reports in Google Analytics and click on +New Custom Report.
  • Select the report type Flat table.
  • Select the dimensions Page, Full Referrer and Page Title.
  • Select the metric Unique Pageviews.
  • Add a filter that includes the value (entrance) for the dimension Previous Page Path. This filter makes sure that only 404 errors that were not preceded by a page view on your own website (and instead caused by an external link) show in the report.
  • Add a Regex filter for the page title that contains the expression that helps you identify your 404 error page (“404” in the example below, but it could also be “page not found” or something else, depending on the title tag of your 404 error page).

For website with current page as 404 Page 

How to build the report for 404 errors from internal links yourself

  • Go to Customization > Custom Reports in Google Analytics and click on +New Custom Report.
  • Select the report type Flat table.
  • Select the dimensions Page, Previous Page Path and Page Title.
  • Select the metric Unique Pageviews.
  • Add a filter that includes the value "Page Title of 404 page" for the dimension Page Title. 

How to build the report for 404 errors from external links yourself

  • Go to Customization > Custom Reports in Google Analytics and click on +New Custom Report.
  • Select the report type Flat table.
  • Select the dimensions Page, Full Referrer and Page Title.
  • Select the metric Unique Pageviews.
  • Add a filter that includes the value "Page Title of 404 page" for the dimension Page Title.