Re: Batch file



I wasn't even aware of the "Title" command. Good one!
Your code contains a small error. All your redirections should read

>> "%Userprofile%\Desktop\test.txt"

i.e. with the surrounding double quotes (which I'm sure you're aware of!).
Furthermore, the "exit" command is superfluous.


"Royce" <Royce@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:43733E19-6F67-4F01-A3EA-7316AAB0C97A@xxxxxxxxxxxxxxxx
> Or this...
>
> @echo off
> title COPYING FILES...
> for /l %%i in (1,1,11) do echo.
> echo Please Wait While Files Are Being Copied...
> echo Started Copying Files On %date% At %time% >>
> %Userprofile%\Desktop\test.txt
> xcopy C:\test G:\backup /e /c /f /h /y >> %Userprofile%\Desktop\test.txt
> echo Stopped Copying Files On %date% At %time% >>
> %Userprofile%\Desktop\test.txt
> exit
>
> "George Schneider" wrote:
>
> > I need some help on this one. I want to copy all files from my C:\test
to
> > G:\Backup. In addition I want to create a text file that displays the
date
> > and time started and date and time finished. I want to script using a
batch
> > file.
> >


.



Relevant Pages

  • Re: Shell Script to Remove Old Files
    ... Note it needs a TSM server: ... # Verify command line arguments ... echo "\nError: $STARTDIR does not exist.\n" ...
    (comp.unix.admin)
  • Re: Yet another "stop the bash quoting" post
    ... |> Output from running the file1.sh command is: ... |> the argument doesn't contain those single quotes; ... | By using set -x in the bash script and running /command/ without the ...
    (comp.os.linux.misc)
  • Re: Yet another "stop the bash quoting" post
    ... |> Output from running the file1.sh command is: ... |> the argument doesn't contain those single quotes; ... | By using set -x in the bash script and running /command/ without the ...
    (comp.unix.shell)
  • Re: Problem in bash script with single and double quotes
    ... interactive bash shell by using the command ... The single and double quotes must be present as shown. ... command that I want to run. ... This line comes from echo is exactly what ...
    (comp.unix.shell)
  • Re: Errors returned by System()function
    ... specified command succesfully and /that/ command ... For example ('echo $?' ... Seems that bash exits with a exit code of 1 when it can't find the ... php$ wget http://www.baddomain.net/index.html ...
    (comp.lang.php)

Loading