Batch file question.

Discussion in 'General Off-Topic Chat' started by test84, Nov 9, 2007.

Nov 9, 2007

Batch file question. by test84 at 2:21 AM (620 Views / 0 Likes) 3 replies

  1. test84
    OP

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    what is defualt NO for an xcopy command?
    like xcopy f:\ c:\ -n
    so it will just copy newer files, thnx.
     
  2. PuyoDead

    Member PuyoDead Hey! Hey! Oh!

    Joined:
    May 5, 2003
    Messages:
    698
    Location:
    Cincinnati, OH
    Country:
    United States
    If you mean so that it will only copy files that are "newer" than their previous files, then use -d

    Normally, you'd use -d:date to copy anything newer than a certain date, but just using -d will overwrite anything that has a newer version than the file where it is being copied to. Anything that is the same file will be skipped.
     
  3. test84
    OP

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    thnx for ur answer.
    that didnt work.
    since it asks everytime to overrite a file or not and seems that its logic is not working too.

    i want oppsite of /y switch, to use it to suppress the asking and copy whatever is newer on my flash disk and copy things are not on disk.

    p.s. hope u dont ever get lost in translation.
     
  4. PuyoDead

    Member PuyoDead Hey! Hey! Oh!

    Joined:
    May 5, 2003
    Messages:
    698
    Location:
    Cincinnati, OH
    Country:
    United States
    First off, I meant to use /d not -d. Sorry, dumb error that. I'm not sure what you're using it for, but here's what I made a batch file for.

    When I insert my MicroSD card, the menu that windows gives has the top option of backing up my saves. What it does, it copies every *.sav file on the card to a directory on my computer. If the file already exists, it only overwrites it if the save on my card is newer than the backup on my computer. Otherwise, it skips it.

    Here's what's in my batch file:

    xcopy /S /I /Y /D \*.sav C:\NDS\R4\Saves\Joe

    This might help for switches and such. http://support.microsoft.com/kb/289483
     

Share This Page