I am trying to run a simple backup (mirror) of one whole disk (d :) to another disk (k :). I created a .bat file ('backup.bat') that defines the source (d :) and destination (k :) and placed this batch file in a folder on d (d: \ temp). When I double-click on a batch file, it defines the source as d: \ temp, not the one I defined as in the batch file; d :.
Here is the text in the .bat file:
@echo off echo To begin backing up data: pause robocopy "D:" "K:" /L /v echo. pause exit
And this is what appears when I double click on backup.bat

As you can see, the source is defined as d: \ temp. Here is the batch file, but in the batch file I defined it as D :. For some reason, the assignment is determined correctly.
Any ideas?
-al
EDIT: if I add '/' to the source and destination location, see the code below, I see even weirder behavior (see screenshot). The source is now both the designated source and destination, without destination.
@echo off echo To begin backing up data: pause robocopy "D:\" "K:\" /L /v echo. pause exit

And if I remove the "" from the source and destination ... IT WORKS!
@echo off echo To begin backing up data: pause robocopy D:\ K:\ /L /v echo. pause exit

source share