Loading ...
Sorry, an error occurred while loading the content.

Re: Daily Backup

Expand Messages
  • Ray McCormick
    Xxcopy website: rather than download a specific version go to www.xxcopy.com then click on menu for the current version. The current version is 3.08.0 but if
    Message 1 of 22 , Mar 9, 2011
    • 0 Attachment
      Xxcopy website: rather than download a specific version go to www.xxcopy.com
      then click on menu for the current version.

      The current version is 3.08.0 but if you have Win7SP1 that will give a
      message "not tested on this OS". Just accept to carry on (or go to
      www.xxcopy.com/betatest for 3.09.5). The "not tested..." message is not a
      problem unless a script is running unattended.

      Best beginners help is, after install, xxcopy /help and xxcopy /helpa but do
      direct the output to a text file rather than the screen. It is much easier
      to peruse. Also on the website is an On-Line Manual containing a series of
      'technical notes' and the download will contain xxcopy.chm.
      Now to your command line:
      xxcopy S:\app\databases\* . /S /H /Y /BZX

      There is no need for the * BUT always follow a folder path with the \ to
      indicate that it is a folder and not a file
      Is the dot a relative folder? I would much prefer to specify both source and
      destination as full paths.
      /BZX excludes files of the same size; but what if the file has changed but
      its size is the same? I would use /bu/bn. /bu is a composite switch, short
      for 'backup'. It includes also read-only files (Files copied from CD/DVD are
      often read-only). Take a look at xxcopy /bu/bn/?

      You can then, if you so wish, add switches for logs, items to include or
      exclude and anything else that takes your fancy.

      You may have gathered I favour Xxcopy; so many switches and so versatile.

      BTW. The Xxcopy group is at http://tech.groups.yahoo.com/group/xxcopy/ and
      further queries on xxcopy would best be directed there.
    • Andrew Streule
      My clever dynamic wake-on-lan script almost works but there seems to be some weird syntax/logic error that makes no error but clearly isn t working like its
      Message 2 of 22 , Mar 10, 2011
      • 0 Attachment
        My clever dynamic wake-on-lan script almost works but there seems to be
        some weird syntax/logic error that makes no error but clearly isn't
        working like its supposed to. The set commands don't work but the
        variables %%b and %%c definitely contain the correct information.
        =================================
        @echo off

        del temp.txt
        set mac=
        set ip=

        dsquery computer -limit 5000 dc=domain,dc=domain,dc=domain,dc=uk | find
        "%1" /I >> temp.txt

        for /f "tokens=2 delims==," %%a in ('type temp.txt') do (



        if exist \\server\share\lapmacs\%%a.log for /f "tokens=* delims= " %%b
        in ('type \\server\share\lapmacs\%%a.log') do set mac=%%b && echo %%b
        if exist \\server\share\ips\%%a.txt for /f "tokens=14 delims=: " %%c in
        ('type \\server\share\ips\%%a.txt') do set ip=%%c && echo %%c

        echo ..........%%a %mac% %ip%

        rem wolcmd %MAC% %IP% 255.255.0.0 7
        )

        ================================
        NOTES
        %1 contains a common computer name prefix
        The content of lapmaps\%%a.log is just a mac address
        The content of ips\%%a.txt is " IP Address. . . . . . . . . . . .
        : 192.168.20.23"




        Probably doing something simple wrong but don't know & trial/error not
        working.

        Thanks

        Andy
      • foxidrive
        ... This illustrates the issue - variables set in parentheses are not available for use within the parentheses. Unless you use delayed expansion. @echo off (
        Message 3 of 22 , Mar 10, 2011
        • 0 Attachment
          On 11/03/2011 01:07, Andrew Streule wrote:
          > My clever dynamic wake-on-lan script almost works but there seems to be
          > some weird syntax/logic error that makes no error but clearly isn't
          > working like its supposed to. The set commands don't work but the
          > variables %%b and %%c definitely contain the correct information.
          > =================================
          > @echo off
          >
          > del temp.txt
          > set mac=
          > set ip=
          >
          > dsquery computer -limit 5000 dc=domain,dc=domain,dc=domain,dc=uk | find
          > "%1" /I>> temp.txt
          >
          > for /f "tokens=2 delims==," %%a in ('type temp.txt') do (
          >
          >
          >
          > if exist \\server\share\lapmacs\%%a.log for /f "tokens=* delims= " %%b
          > in ('type \\server\share\lapmacs\%%a.log') do set mac=%%b&& echo %%b
          > if exist \\server\share\ips\%%a.txt for /f "tokens=14 delims=: " %%c in
          > ('type \\server\share\ips\%%a.txt') do set ip=%%c&& echo %%c
          >
          > echo ..........%%a %mac% %ip%
          >
          > rem wolcmd %MAC% %IP% 255.255.0.0 7
          > )
          >
          > ================================
          > NOTES
          > %1 contains a common computer name prefix
          > The content of lapmaps\%%a.log is just a mac address
          > The content of ips\%%a.txt is " IP Address. . . . . . . . . . . .
          > : 192.168.20.23"
          >
          >
          >
          >
          > Probably doing something simple wrong but don't know& trial/error not
          > working.
          >
          > Thanks
          >
          > Andy

          This illustrates the issue - variables set in parentheses are not
          available for use within the parentheses. Unless you use delayed expansion.


          @echo off
          (
          set a=abc
          echo try 1 %a%
          )
          echo try 2 %a%
          pause
        • Glenn B. Lawler
          ... If you type: SET /? You will get a full explanation about this. The short version is you need to enable delayed environment variable expansion and use the
          Message 4 of 22 , Mar 10, 2011
          • 0 Attachment
            On 11/03/2011 01:07, Andrew Streule wrote:
            > My clever dynamic wake-on-lan script almost works but there seems to
            > be some weird syntax/logic error that makes no error but clearly isn't
            > working like its supposed to. The set commands don't work but the
            > variables %%b and %%c definitely contain the correct information.
            > =================================
            > @echo off
            >
            > del temp.txt
            > set mac=
            > set ip=
            >
            > dsquery computer -limit 5000 dc=domain,dc=domain,dc=domain,dc=uk |
            > find "%1" /I>> temp.txt
            >
            > for /f "tokens=2 delims==," %%a in ('type temp.txt') do (
            >
            >
            >
            > if exist \\server\share\lapmacs\%%a.log for /f "tokens=* delims= " %%b
            > in ('type \\server\share\lapmacs\%%a.log') do set mac=%%b&& echo %%b
            > if exist \\server\share\ips\%%a.txt for /f "tokens=14 delims=: " %%c
            > in ('type \\server\share\ips\%%a.txt') do set ip=%%c&& echo %%c
            >
            > echo ..........%%a %mac% %ip%
            >
            > rem wolcmd %MAC% %IP% 255.255.0.0 7
            > )
            >
            > ================================
            > NOTES
            > %1 contains a common computer name prefix The content of
            > lapmaps\%%a.log is just a mac address
            > The content of ips\%%a.txt is " IP Address. . . . . . . . . . . .
            > : 192.168.20.23"
            >
            >
            >
            >
            > Probably doing something simple wrong but don't know& trial/error
            > not working.
            >
            > Thanks
            >
            > Andy

            If you type:
            SET /?

            You will get a full explanation about this. The short version is you need to
            enable delayed environment variable expansion and use the exclamation point
            (!) instead of the percent sign (%) to dereference the variables.

            Glenn Lawler
            www.incodesystems.com
          Your message has been successfully submitted and would be delivered to recipients shortly.