Quick Tips

A little something about everything

internet marketing and website development made simple..

How to copy/backup files from your computer to a server on the network using xcopy, task scheduler and a .bat file

Create a backup .bat file and copy the red text below into the file, edit as needed.

@echo off
set SPACER=echo ----------------------------------- (No useful function, This line just sets the spacer in the output, anywhere in the file that you place %SPACER%, it will palce the -----------------------)
echo Do not close, Backing up files (echo tells the batch file to just print out[echo] a line, it has no real action other than to show a line of text to the user)
%SPACER% (--------------------------)
echo Running xcopy, to backup files from c:\Backup\This\Directory to
\\server\share\foldertocopyto with /s for include all subdirectories. (echo again)
%SPACER%

xcopy "C:\Backup\This\Directory" "\\server\share\foldertocopyto" /s /y (this is the code and the area you will want to change in order to customize it for each computer. The location in the first set of quotes tells the batch file where to copy from(source) and the second location in the quotes is the destination, the /s means include all subdirectories within the source location and the /y means to accept all prompts, for example overwrite, continue if it can't find a file etc.)

%SPACER%
echo Finished Backing up files (echo, no real use... just output in the cmd box)
TIMEOUT /T 1000 (this is a timeout so the user can see what was done and the results, they can click spacebar to close or wait 1000 seconds. You can also edit the time or remove this line if you want it to close immediately)

Now open windows task scheduler, create a new task, set the time/date for running a backup, then set it to run a program, browse to where you saved the backup.bat file and your done.

This guide assumes you have proper network security already setup. 

How to make google only look at lower case url for sites hosted on windows IIS Server, fixes duplicate title tags in Webmaster Tools error

This method can be used to fix duplicate content errors and make it so google only indexes one version of your urls, which will prevent you from getting a negative modifiers.

In order to do this you have two options.

  1. Use the proper canonical tags, for example place the following code at the top of your website:
  2. Use the following script to automate the process and only allow lower case urls to be viewed on your site, create a global.asax file and place it in your site's main directory. 

If you plan to use both methods be sure to use only lower case for your canonical tags or you will end up with problems.

Dealing with compeditor low quality link spam or SEO devaluation. Google disavow links tool

In some cases competitors may attempt to lower you website value by creating hundreds or thousands of low quality links back to your site. In many cases it is next to impossible to know who is creating the links without going through a legal process to track and trace the original submissions.

Generally an easier way to deal with such issues is to contact the webmasters of these sites that are linking to your domain(s) or if that is not an option Google does offer a secret agent, for when the SEO task seems more like mission impossible you can use the "Disavow Tool" to remove all association from a link to your site. Doing this can be tedious and time consuming but very effective at removing negative links to your domain.

Abusing this tool can also get your domain flagged even more harshly than not, so always try other methods of removal before using this tool.

How to target Safari only using CSS and Javascript while keeping your page W3 compliant and completely valid

Here is a neat little trick you can use to target Safari and make it behave while fixing cross browser layouts. This method will allow you to keep a page valid and it will allow you to only target Safari.

First thing you want to do is use javascript to inject a css file for all browsers that support webkit with this code: 

Now, like I stated above this will target all browsers that currently support webkit and add support for it in the future so you cannot rely on only this. So now you need to create the css file and add some code that is Safari specific by using the double # method. Some people will ask, why not just include the double # to begin with? And the simple answer is that it will cause your CSS not to validate.

Here is the example css code that will target only Safari

Enjoy!