Results 1 to 9 of 9

Thread: Copy Files without changing Dates (Resolved)

  1. #1

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284

    Copy Files without changing Dates (Resolved)

    How can I copy a whole folder from one PC to another networked PC without any properties changing especially date created?

    Can be done with either VB or Batch files or CMD commands.

    Can anyone help?
    Last edited by MikeBAM; Oct 7th, 2003 at 09:47 PM.
    ~* )v( ! /< E *~

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Maybe xcopy will have the flag you need? Try "xcopy /?".
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Here is another Graphical option (not under dos at least )

  4. #4

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284
    I've looked at the help on xcopy and Copy.
    I was hoping an applacation wouldn't be necessary. (unless it was my own code)

    xxcopy and robcopy are somethings i've herd of around the net but dont know much about them nore do I know where to find them.
    ~* )v( ! /< E *~

  5. #5
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    Code:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\Documents and Settings\Administrator>xcopy /?
    Copies files and directory trees.
    
    XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                               [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                               [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
                               [/EXCLUDE:file1[+file2][+file3]...]
    
      source       Specifies the file(s) to copy.
      destination  Specifies the location and/or name of new files.
      /A           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.
      /D:m-d-y     Copies files changed on or after the specified date.
                   If no date is given, copies only those files whose
                   source time is newer than the destination time.
      /EXCLUDE:file1[+file2][+file3]...
                   Specifies a list of files containing strings.  Each string
                   should be in a separate line in the files.  When any of the
                   strings match any part of the absolute path of the file to be
                   copied, that file will be excluded from being copied.  For
                   example, specifying a string like \obj\ or .obj will exclude
                   all files underneath the directory obj or all files with the
                   .obj extension respectively.
      /P           Prompts you before creating each destination file.
      /S           Copies directories and subdirectories except empty ones.
      /E           Copies directories and subdirectories, including empty ones.
                   Same as /S /E. May be used to modify /T.
      /V           Verifies each new file.
      /W           Prompts you to press a key before copying.
      /C           Continues copying even if errors occur.
      /I           If destination does not exist and copying more than one file,
                   assumes that destination must be a directory.
      /Q           Does not display file names while copying.
      /F           Displays full source and destination file names while copying.
      /L           Displays files that would be copied.
      /G           Allows the copying of encrypted files to destination that does
                   not support encryption.
      /H           Copies hidden and system files also.
      /R           Overwrites read-only files.
      /T           Creates directory structure, but does not copy files. Does not
                   include empty directories or subdirectories. /T /E includes
                   empty directories and subdirectories.
      /U           Copies only files that already exist in destination.
      /K           Copies attributes. Normal Xcopy will reset read-only attributes.
      /N           Copies using the generated short names.
      /O           Copies file ownership and ACL information.
      /X           Copies file audit settings (implies /O).
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.
    
    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.
    
    C:\Documents and Settings\Administrator>
    Unite, proletariat!

  6. #6

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284
    Ok, I'm mainly looking for DATE CREATED to stay the same. /K on Xcopy doesn't do it.
    ~* )v( ! /< E *~

  7. #7
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    Code:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\Documents and Settings\Administrator>cd desktop
    
    C:\Documents and Settings\Administrator\Desktop>dir
     Volume in drive C has no label.
     Volume Serial Number is 70C1-04A2
    
     Directory of C:\Documents and Settings\Administrator\Desktop
    
    24/03/2003  09:52 PM    <DIR>          .
    24/03/2003  09:52 PM    <DIR>          ..
    28/12/2002  11:56 AM                 6 OUAC.txt
    03/02/2003  12:55 PM               592 SBI4UL Local.lnk
    03/02/2003  12:21 PM               172 SBI4UL Online.url
    03/02/2003  12:54 PM               616 SBI4UL Text.lnk
    03/02/2003  12:55 PM               597 SPH4UL Local.lnk
    03/02/2003  10:32 AM               172 SPH4UL Online.url
    03/02/2003  12:55 PM               621 SPH4UL Text.lnk
                   7 File(s)          2,776 bytes
                   2 Dir(s)   3,407,351,808 bytes free
    
    C:\Documents and Settings\Administrator\Desktop>md c:\test
    
    C:\Documents and Settings\Administrator\Desktop>xcopy *.* c:\test /k
    C:OUAC.txt
    C:SBI4UL Local.lnk
    C:SBI4UL Online.url
    C:SBI4UL Text.lnk
    C:SPH4UL Local.lnk
    C:SPH4UL Online.url
    C:SPH4UL Text.lnk
    7 File(s) copied
    
    C:\Documents and Settings\Administrator\Desktop>dir c:\test
     Volume in drive C has no label.
     Volume Serial Number is 70C1-04A2
    
     Directory of c:\test
    
    24/03/2003  10:44 PM    <DIR>          .
    24/03/2003  10:44 PM    <DIR>          ..
    28/12/2002  11:56 AM                 6 OUAC.txt
    03/02/2003  12:55 PM               592 SBI4UL Local.lnk
    03/02/2003  12:21 PM               172 SBI4UL Online.url
    03/02/2003  12:54 PM               616 SBI4UL Text.lnk
    03/02/2003  12:55 PM               597 SPH4UL Local.lnk
    03/02/2003  10:32 AM               172 SPH4UL Online.url
    03/02/2003  12:55 PM               621 SPH4UL Text.lnk
                   7 File(s)          2,776 bytes
                   2 Dir(s)   3,407,327,232 bytes free
    
    C:\Documents and Settings\Administrator\Desktop>
    Works here
    Unite, proletariat!

  8. #8

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284
    siyan - the DIR command shows the date modified not the date created. If you navigate to a file just copyed via my computer/explorer and check the properties it will list Date created as the same day is was copied (Today) (March 24, 2003)

    I also did just test the same thing you did but I copied an mp3 file from my collection (a file made 2 years ago) to a test folder and checked both with DIR command and the properties. Two of the 3 dates changed to todays date. Date Created and Date Accessed
    ~* )v( ! /< E *~

  9. #9

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284
    i solved this with the program "xxcopy" and using the command: xxcopy /TCC
    ~* )v( ! /< E *~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width