Author Topic: XCOPY (Automatic Batch File Copy)  (Read 6779 times)

Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
XCOPY (Automatic Batch File Copy)
« on: February 02, 2007, 11:31:15 PM »
I'm looking to make a batch file to back up my dads files every time he logs on and off, that much i'm capable of, however i'm having some problems with the actual xcopy command, i'll post the stuff here in a bit...

Carigamers

XCOPY (Automatic Batch File Copy)
« on: February 02, 2007, 11:31:15 PM »

Offline TriniXaeno

  • Administrator
  • Akatsuki
  • *****
  • Posts: 18836
  • Country: tt
  • Chakra 14
    • :ps3::wii::xbox360:
  • Referrals: 35
    • View Profile
    • http://www.carigamers.com
  • CPU: Intel Core i7-2600K
  • GPU: Geforce GTX 680 2GB
  • RAM: 16GB
  • Broadband: :flow:
  • MBL: Nexus 5x
  • PSN: TriniXaeno
  • XBL: TriniXaeno
Re: XCOPY (Automatic Batch File Copy)
« Reply #1 on: February 03, 2007, 06:43:57 AM »
As novel as a batch file is, NT Backup would probably serve you better.

Just do start -> run -> ntbackup

Got a lot of good features in there for backing up stuff. Play around with it.


Offline Spazosaurus

  • Dr. Herp Derpington
  • Administrator
  • Akatsuki
  • *****
  • Posts: 7685
  • Country: tt
  • Chakra 52
  • Referrals: 3
    • View Profile
    • The Awesome Company
  • CPU: i5 3470
  • GPU: GTX 780
  • RAM: 8GB Corsair
  • Broadband: Blink 2Mb + Flow 20Mb
Re: XCOPY (Automatic Batch File Copy)
« Reply #2 on: February 03, 2007, 06:53:15 AM »
What Baego you're back or just making a guest appearance?

Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
Re: XCOPY (Automatic Batch File Copy)
« Reply #3 on: February 03, 2007, 08:28:06 AM »
@echo Backing-up your files.
@echo Please wait...
xcopy "<<back up destination here>>\*.*" /s /e /q /y
@pause

well i figured it out apparently you need the " and " in it  :S go figure, i think ntbackup already, but my dad not so techy, i wanted something that if i'm not around he could just go into the backup drive himself and copy over the original.

thanks for the advice though

Offline TriniXaeno

  • Administrator
  • Akatsuki
  • *****
  • Posts: 18836
  • Country: tt
  • Chakra 14
    • :ps3::wii::xbox360:
  • Referrals: 35
    • View Profile
    • http://www.carigamers.com
  • CPU: Intel Core i7-2600K
  • GPU: Geforce GTX 680 2GB
  • RAM: 16GB
  • Broadband: :flow:
  • MBL: Nexus 5x
  • PSN: TriniXaeno
  • XBL: TriniXaeno
Re: XCOPY (Automatic Batch File Copy)
« Reply #4 on: February 03, 2007, 08:41:06 AM »
Very well.

Although I think NT Backup can also copy the files raw, as opposed to putting them in a compressed backup file. Has it's pros and cons obviously.

yeah unknown. I'm back. Now with 33% more calcium.


Carigamers

Re: XCOPY (Automatic Batch File Copy)
« Reply #4 on: February 03, 2007, 08:41:06 AM »

Offline Paradoxxx

  • Genin
  • *
  • Posts: 14
  • Chakra 0
  • Referrals: 0
    • View Profile
Re: XCOPY (Automatic Batch File Copy)
« Reply #5 on: February 03, 2007, 11:19:55 AM »
Devon to enjoy the best of both worlds consider using a command line compression utility.  You may find one at http://www.winace.com, I think you know what to do from there.  With the integrated zip compatibility that windows xp provides using a zip output file will allow your dad to go thru the archives as if it were a folder and copy paste.  Thats assuming you are on a machine with xp. THe gui winace can output zip files, if push comes to shove you can get a zip command line util.  Back in the days it was.. pkunzip?

In my experience its best to use some form of archiving instead of just a single backup, I havn't used dos script in a while but if possible use the current datetime as the name of the resulting compressed file to maintain a small archive instead of the overwriting with the /y option.  Helps with the Oh shucks i messed up this file and backed it up.. scenarios.

If you choose to not take any of this on, might as well take off the /q to make it look a bit cooler with the file names coming up, hey just preference so the user knows something is going on.
__________________

« Last Edit: February 03, 2007, 11:25:12 AM by Paradoxxx »

Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
Re: XCOPY (Automatic Batch File Copy)
« Reply #6 on: February 03, 2007, 02:16:29 PM »
hmmm not a half bad idea 7zip have a nice command line version, i suppose i could implement that...
might make it easier when i get the Network Drive back up, was going to use this as a temporary solution (as the ND in my pc and mine out-of-commissions now) but i think i will take your advice :P and implement this versus the ole 'Ctrl+C --> Ctrl+V' into the ND/

as for the /q, i think when the ND back up /z would look even cooler :D

Offline Paradoxxx

  • Genin
  • *
  • Posts: 14
  • Chakra 0
  • Referrals: 0
    • View Profile
Re: XCOPY (Automatic Batch File Copy)
« Reply #7 on: February 04, 2007, 01:10:04 PM »
heh a little fault tollerance with that /z.

I am glad I could lend a hand to the creative process of your project, I hope all goes well (insha allah).  If I ever get sometime (most likely not) I will try to design a simple backup application for my dad which will perform a similar task to your script with maybe a few added features specific to hist needs.  I'll hook you up with a copy should that day reach.


Offline TriniXaeno

  • Administrator
  • Akatsuki
  • *****
  • Posts: 18836
  • Country: tt
  • Chakra 14
    • :ps3::wii::xbox360:
  • Referrals: 35
    • View Profile
    • http://www.carigamers.com
  • CPU: Intel Core i7-2600K
  • GPU: Geforce GTX 680 2GB
  • RAM: 16GB
  • Broadband: :flow:
  • MBL: Nexus 5x
  • PSN: TriniXaeno
  • XBL: TriniXaeno
Re: XCOPY (Automatic Batch File Copy)
« Reply #8 on: February 04, 2007, 03:28:13 PM »
If you want to really go buck wild with command line options then use xxcopy. It is what I use @ bg for our scripted copy needs. Industrial strenght business. This is a "Thank You Jesus" kind of util.

www.xxcopy.com

(yeah a command line util with it's own domain name, lol)

Get ready to be knocked out with features: (Try and beat this one para, lol)

Check the full list here: http://www.xxcopy.com/xxcopy01.htm

Below is a snippet

From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Command Parameters Reference
Date:    2005-05-02  Revised for ver 2.92.4
====================================================================

Basic Command Parameter Syntax:

  XXCOPY   source   destination    (simplified syntax)

  In its simplest form, XXCOPY takes two parameters,

      from WHERE to WHERE

  This very intuitive command syntax has its root in the COPY command
  introduced in 1981 as a PC-DOS (MS-DOS) built-in command.

  The first parameter is the source specifier and the second one is
  the destination specifier.  These two parameters must be in this
  order.  As common to the COPY and XCOPY command syntax, the
  destination specifier can be omitted.  Then, by default, the
  current directory in the current drive becomes the destination.

  XXCOPY   source  [ destination ]

  By convention, an optional parameter is denoted in the syntax
  definition with a pair of square-brackets surrounding it.

  In addition, you may add command switches (which are also called
  options) to customize XXCOPY's behaviors.  It is the extensive
  set of switches that make XXCOPY so versatile and powerful.


Full Command Parameter Syntax:

  XXCOPY   source  [ destination ]  [ switches... ]

  All switches start with a slash (/) character whereas the source
  and the destination specifiers do not have the slash(/) prefix.
  The source and the destination specifiers must be separated from
  other items in the command line by at least one blank (space or tab)
  character.  On the other hand, you may omit blank characters between
  switches in order to minimize the total length of the command line.

  Example:

     XXCOPY  C:\mydir\   D:\yourdir\   /S /H

     Here, "C:\mydir\"  is the source specifier and "D:\yourdir\" is
     the destination specifier.  They do not start with a slash (/).
     It has two (/S and /H) switches.

  Note that the positions of the switches need not be at the end of
  the command line.  Switches may begin even before the source specifier.
  The order of the switches is not generally important except when
  conflicting switches are specified, the rightmost switch will
  prevail.  More rules for special cases are discussed at the end
  of this article.  For a complete syntax and semantics for the
  source specifier, see XXTB #04.

     -------------------------------------------------------------
      Caution to DOS novices:

      The blank characters (space or tab) act as the delimiter of
      the arguments.  Therefore, a name with embedded space must
      be surrounded by a pair of quotes (") to be kept unbroken.
  
         XXCOPY   C:\My Documents\   D:\backup\     // bad
         XXCOPY  "C:\My Documents\"  D:\backup\     // good

      This is true for nearly all command line applications.
     -------------------------------------------------------------

  Once you learn this simple rule, it is quite easy to understand a
  long XXCOPY command line.


XXCOPY switches:

  Here, a first time XXCOPY user may be overwhelmed by the sheer
  number of the switches.  Since the power of XXCOPY comes from
  these switches, you have to learn to live with them.  We try
  our best to keep these (still increasing) switches under control.
  Since the number of switches far exceeds the available alphabet,
  many of the switches use multiple characters.  For better or worse,
  the syntax adheres to the original XCOPY's syntax very closely.
  It is a mixed blessing, for sure.  So, when we feel very strongly,
  we took liberty in making improvements in a few exceptional cases.
  But, overall, if you are very familiar with how XCOPY works, there
  will be very little surprise for you.

  Let us just take a look at the full list of XXCOPY switches with
  a terse comment on each.  For most switches, full explanation will
  be given later.

      for Command Line Syntax                          XXTB #25
      for Command Reference Alphabetic Listing         XXTB #26
      for Command Reference Functional Classification  XXTB #27
      for The Wild-Wild-Source Specifier               XXTB #28


  -----  The following switches use file attributes to select files -----

         /A  Same as /ATA. Copies only files with the archive attribute set.
             Doesn't change the attribute.
         /M  Copies only files with the archive attribute set.
             Turns off the archive attribute.
  /AT<mask>  Selects files by the attribute bits (AHSR).
             You may use two or more /AT<mask> switches to specify multiple
             attributes required.  E.g., /ATA/ATH qualifies files with both
             the A(rchive) bit and the H(idden) bits.
             Or, you may use one /AT<mask> switch with multiple letters to
             select alternative attribute bits to select files.  E.g.,
             /ATAH qualifies a file which has either A-bit, H-bit or both.
  /AX<mask>  Excludes files with the specified attribute bits (AHSR).
             You may use two or more /AX<mask> switches to specify
             attribute bits to exclude files for file operations.  E.g.,
             /AXA/AXH excludes files with A-bit, H-bit, or both.
             Or, you may use one /AX<mask> switch with multiple letters to
             exclude files with only the specified combination of attribute
             bits.  E.g., /AXAH excludes files with both A-bit and H-bit.

      Note:  The /AT<mask> and /AX<mask> switches have opposite conjugation
             rules (the effects of combining attribute bits --- AND and OR).

        /A0  Cancels *ALL* /A, /M, /AT, and /AX switches.

  -----  The following switches modify the file attributes -----

        /AA  Sets   the src file archive bit (without actually copying).
        /AZ  Clears the src file archive bit (without actually copying).
             Note: Both /AA and /AZ implicitly set /H (can be overridden).
        /AC  Copies specified files irrespective of the archive attribute.
             Turns off the archive attribute after XXCOPY is done.
  /AN<mask>  Sets a new value to file attribute bits (replace the value).
             The <mask> value is a combination of letters, ASHR.
  /AR<mask>  Resets file attribute bits (clears specified bits).
  /AS<mask>  Sets file attribute bits (sets specified bits).
      
      Note:  The <mask> value for /AR and /AS specifies attributes (AHSR)
             whose bits are either reset or set respectively to the existing
             file attributes. Unspecified attributes bits are kept unchanged.
      
      Note:  The /AA, /AN, /AR, /AS and /AZ switches modify the file
             attributes without copying the files to the destination,
             whereas the /A, /AT and /AX switches select files by the file
             attributes for various operations (copy, list, remove, etc.).

  -----  The following switches use other file attribute bits -----

         /H  Copies hidden and/or system files also.
        /H0  Excludes hidden and/or system files (default).
        /Ho  Copies hidden and/or system files only.
         /R  Overwrites read-only files.
        /K0  Keeps H-bit and S-bit, sets A-bit, clears R-bit (default).
         /K  Keeps the source attributes including read-only (same as /KS).
        /KS  Keeps the source attributes including the read-only bit.
        /KD  Keeps the attributes of destination (overwritten) file.
        /KN  Sets the destination attributes to normal (only /A).

            (File attributes are discussed in XXTB #06)

  -----  The following switches are useful for backup and archive -----

        /BI  Backs up incrementally, different (by time/size) files only.
        /BB  Backs up brand new files only (does not overwrite existing ones).
        /BN  Backs up newer files only      (includes brand new files).
        /Bo  Backs up older files only      (includes brand new files).
        /BX  Backs up different-date files  (includes brand new files).
        /BZ  Same as /BZX.
       /BZE  Backs up equal-size  files  (includes brand new files).
       /BZL  Backs up larger-size files  (includes brand new files).
       /BZS  Backs up smaller-size files (includes brand new files).
       /BZX  Backs up different-size files  (includes brand new files).
        /BE  Backs up exactly the same files(includes brand new files).
        /BS  Selects exactly the same files (this is useful with /RS).
        /BU  Standard Backup switch (same as /r/i/bi/q/c/h/e/v/y).
        /B0  Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches.
         /U  Updates the files that already exist in destination.

             Note: A "brand new" file refers to a file which exists in the
                   source directory but not in the destination directory
                   (Micrososoft's Robocopy call it a "lonely file").

        /SP  Spans the copy job over multiple destination (new volume).

             Note: /SP cannot be used with switches which reference the
                   destination for file selection --- that is, the /Bxx
                   (backup) switches, and /U will be disabled by /SP.
                   That is, the spanning of the destination volume by /SP
                   assumes the backup operation is a full backup without
                   referencing the files already on the destination.

  -----  The following switch adds inclusive alternate templates -----

  /IN<tmpl>  Includes an alternate filename template (tmpl).
            
             You may specify as many alternate filename patterns as you want.
             The template must be for the "Lastname" of the source specifier
             (no backslash in the template, but wildcard characters are OK).

  -----  The following switches exclude directories or files -----

  /X<xspec>  Adds an exclusion specifier (xspec) (see below for exclusion).
 /EX<xlist>  Specifies a text file which contains a list of xspecs (see below).
    
« Last Edit: February 04, 2007, 03:29:55 PM by [X]-Baego »

Offline Crixx_Creww

  • Akatsuki
  • *****
  • Posts: 9057
  • Country: 00
  • Chakra -12
  • ANBU OF THE HIDDEN VILLAGE FOAK
    • Atari 2600.
  • Referrals: 11
    • View Profile
    • www.crixxcrew.com
  • CPU: Intel Q6600 @3.2 Ghz
  • GPU: Nvidia Xfx geforce 9800GTX+
  • RAM: 8 Gigs Mixed kingston and corsair ddr2
Re: XCOPY (Automatic Batch File Copy)
« Reply #9 on: February 04, 2007, 05:01:01 PM »
/toomuch stupid scripts to read

Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
Re: XCOPY (Automatic Batch File Copy)
« Reply #10 on: February 04, 2007, 07:16:16 PM »
ooooooggggggooooooooodddddddd

that is really industrial strength qui!
I go need goggles and gloves to handle that :P

remember when using xxcopy to wear all nessasary ppe :P

Offline Paradoxxx

  • Genin
  • *
  • Posts: 14
  • Chakra 0
  • Referrals: 0
    • View Profile
Re: XCOPY (Automatic Batch File Copy)
« Reply #11 on: February 05, 2007, 11:49:26 AM »
An impressive extension to XCOPY, i might even find an application for the Clone switch.
If I were to go one up I might even recommened XXCOPY PRO but i'm not.  Devon you now have options, what you can do is list your the features you will need to complete the task and compare each method/tool provided, your goal would be to determine the most efficient (least resources used to complete the task) method.  Whats the point of using XXCOPY or XXCOPY PRO if you are only using the switches provided in XCOPY.

I just noticed that L in your sig and I will assume you are fan of Death Note, try to do like L and consider every possible scenario and its outcomes.  Maybe the entire command line technique isn't the right solution? It up to you.


Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
Re: XCOPY (Automatic Batch File Copy)
« Reply #12 on: February 05, 2007, 05:10:48 PM »
well the major reason for choosing something like XCOPY was the fact that it native to XP (which i using) and all i really have to do is automate a small program to take my dads files and back them up, it almost all autocad files so they actually natively have a second file that accompany them when u save, with, what else, a .bak extension so it actually have a bit of redundancy, but as the saying goes, yuh doh put all yuh eggs in one basket, the second back up is in case anything happen to the master drive. And my dad (after about 3 years of quarrellings finally take my advice for using layers like mad (well as often as needed) so even if a change is made and is unsatisfactory he can go back easily)

xxcopy is cool, but WAY overkill for this application, as is the need for any third party software, like i tell my friends 'if what yuh using working, why upgrade?'
If i had  a vast amount of pc's to do this with, yeah xxcopy make sense, but for now xcopy doing the wuk...

Oh, and Death note is boss :D, just wish my pc could run higher than 50% cpu usage then i could watch the new ep :(

Offline Paradoxxx

  • Genin
  • *
  • Posts: 14
  • Chakra 0
  • Referrals: 0
    • View Profile
Re: XCOPY (Automatic Batch File Copy)
« Reply #13 on: February 05, 2007, 05:45:35 PM »
Seems that issue is closed.

Please ellaborate on your death note issue and mention which player you are using.
Is it that you want to assign more resources to decoding but your player doesn't allow you to?

Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
Re: XCOPY (Automatic Batch File Copy)
« Reply #14 on: February 05, 2007, 05:57:48 PM »
no as in i using a 350W supply that aint able to push meh other 2 hdds one of which have meh anime on it and the rest ah meh system, right now if i push the system beyond 50% it tries to take too much current from the 12v rail (which apparently was my prob all along as far as pwr supplies concerned) so it does end up actually stressing this itty bitty thing, right now i have to run the onboard graphics too so i eh even able to use meh v/c :( wey this thing is balls...

but i getting a nice dual rail 500w come tomorrow, btw anyone know anywhere selling good sturdy cases that can take 120mm fans? I need to upgrade meh case it WAY to cramped int there

Offline TriniXaeno

  • Administrator
  • Akatsuki
  • *****
  • Posts: 18836
  • Country: tt
  • Chakra 14
    • :ps3::wii::xbox360:
  • Referrals: 35
    • View Profile
    • http://www.carigamers.com
  • CPU: Intel Core i7-2600K
  • GPU: Geforce GTX 680 2GB
  • RAM: 16GB
  • Broadband: :flow:
  • MBL: Nexus 5x
  • PSN: TriniXaeno
  • XBL: TriniXaeno
Re: XCOPY (Automatic Batch File Copy)
« Reply #15 on: February 06, 2007, 07:03:21 AM »
lol, @ wearing ppe with xxcopy.

Yeah, that thing is way overkill.

xxcopy is free and has a gazillion features. The xxcopy pro is EXPENSIVE. I talking us$140 kinda expensive. It adds a few more features for network environments, serious multi computer action. If he thinks xxcopy is overkill (which it is), xxcopy pro is even moreso.

Just playing the ass, like you guys said, regular xcopy is sufficient.

lol @ integrated graphics. For shame.

We run gaming machines with regular single rail psus. 350 watt to 400 watt no probs but you can't go wrong with a dual rail.

We sell cases at Tech Source Ltd. You're welcome to check 'em out and see if any are sturdy enough to your liking.

A few can be seen here. http://www.buytrinidad.com/catalog/index.php?cPath=1_43

but there are more pictures to be posted soon for a better selection.

Offline Nephilim

  • Sannin
  • *****
  • Posts: 2698
  • Country: 00
  • Chakra 56
  • Referrals: 0
    • View Profile
  • CPU: Q94
  • GPU: 4870
  • RAM: 8GB
  • Broadband: Flow
Re: XCOPY (Automatic Batch File Copy)
« Reply #16 on: February 06, 2007, 07:44:24 AM »
thanks hoss, meh case is real crap, compared to the cases i buy 5 yrs ago for LESS these cases nowadays is real toots.

the case i buy for <200 is the one yuh does see spew about all over prw showroom [the grey and silver one with the four lights in the front] and was 1000% better than what yuh finding these days, MUCH more stable in construction.

Carigamers

Re: XCOPY (Automatic Batch File Copy)
« Reply #16 on: February 06, 2007, 07:44:24 AM »

 


* ShoutBox

Refresh History
  • Crimson609: yea everything cool how are you?
    August 10, 2022, 07:26:15 AM
  • Pain_Killer: Good day, what's going on with you guys? Is everything Ok?
    February 21, 2021, 05:30:10 PM
  • Crimson609: BOOM covid-19
    August 15, 2020, 01:07:30 PM
  • Shinsoo: bwda 2020 shoutboxing. omg we are in the future and in the past at the same time!
    March 03, 2020, 06:42:47 AM
  • TriniXjin: Watch Black Clover Everyone!
    February 01, 2020, 06:30:00 PM
  • Crimson609: lol
    February 01, 2020, 05:05:53 PM
  • Skitz: So fellas how we go include listing for all dem parts for pc on we profile but doh have any place for motherboard?
    January 24, 2020, 09:11:33 PM
  • Crimson609: :ph34r:
    January 20, 2019, 09:23:28 PM
  • Crimson609: Big up ya whole slef
    January 20, 2019, 09:23:17 PM
  • protomanex: Gyul like Link
    January 20, 2019, 09:23:14 PM
  • protomanex: Man like Kitana
    January 20, 2019, 09:22:39 PM
  • protomanex: Man like Chappy
    January 20, 2019, 09:21:53 PM
  • protomanex: Gyul Like Minato
    January 20, 2019, 09:21:48 PM
  • protomanex: Gyul like XJin
    January 20, 2019, 09:19:53 PM
  • protomanex: Shout out to man like Crimson
    January 20, 2019, 09:19:44 PM
  • Crimson609: shout out to gyal like Corbie Gonta
    January 20, 2019, 09:19:06 PM
  • cold_187: Why allur don't make a discord or something?
    December 03, 2018, 06:17:38 PM
  • Red Paradox: https://www.twitch.tv/flippay1985 everyday from 6:00pm
    May 29, 2018, 09:40:09 AM
  • Red Paradox: anyone play EA Sports UFC 3.. Looking for a challenge. PSN: Flippay1985 :)
    May 09, 2018, 11:00:52 PM
  • cold_187: @TriniXjin not really, I may have something they need (ssd/ram/mb etc.), hence why I also said "trade" ;)
    February 05, 2018, 10:22:14 AM

SimplePortal 2.3.3 © 2008-2010, SimplePortal