Creating a Batch File to copy a directory
Solved/Closed
        Related:         
- Batch copy folder
- Batch copy directory - Best answers
- Bat copy folder - Best answers
- Anvi folder locker reset key - Guide
- Ps3 update folder - Guide
- Chrome extensions folder - Guide
- Change download folder opera gx - Guide
- Recover files from hidden winmend folder - Windows Forum
8 responses
                        
                    Here is what I use to copy all my user documents over to a destination drive in XP and Vista...
XCOPY "C:\Users" "K:\My Vista Backup" /D /E /C /R /I /K /Y
XCOPY "C:\DOCUME~1" "I:\My XP Backup" /D /E /C /R /I /K /Y
works like a charm
            XCOPY "C:\Users" "K:\My Vista Backup" /D /E /C /R /I /K /Y
XCOPY "C:\DOCUME~1" "I:\My XP Backup" /D /E /C /R /I /K /Y
works like a charm
    What are the /D /E /C /R /I /K /Y for, are they variables that should be input like are they specific dates/years/time a day or something else that is specific to the materiel you are trying to copy or are they just some standards you have to type in the batch file, like are they commands? hope to get an answer soon though I know it is long ago you provided this answer
    
    Hey, they're called switches - they're extra parameters that make the command do a more specific and targeted job (given what the above switches for this command mean below) /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. (His suggestion contains no date so all files in that directory - and sub directories (even if empty 'cause of /E) are copied over if newer than the versions in the place they're being copied to.) /E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. /C Continues copying even if errors occur. /R Overwrites read-only files. /I If destination does not exist and copying more than one file, assumes that destination must be a directory. /K Copies attributes. Normal Xcopy will reset read-only attributes. /Y Suppresses prompting to confirm you want to overwrite. Windows Vista has tried to replace this with Robocopy (Robust File Copy for Windows), but xcopy will still work :)
                        
                    if you whant it to be automatic copy,then write this:(from start to end)
if you whant to copy folder from same place to same place:
------
@Echo Off
Echo Please Press "d"
xcopy "Folder" "Folder2"
exit
------
if you whant to copy folder from place to other:
@Echo Off
Echo Please Press "d"
xcopy "Folder" "C:/Folder2"
exit
------
if you whant copy from other place to other place:
@Echo Off
Echo Please Press "d"
xcopy "C:/Folder" "C:/Folder2"
exit
            if you whant to copy folder from same place to same place:
------
@Echo Off
Echo Please Press "d"
xcopy "Folder" "Folder2"
exit
------
if you whant to copy folder from place to other:
@Echo Off
Echo Please Press "d"
xcopy "Folder" "C:/Folder2"
exit
------
if you whant copy from other place to other place:
@Echo Off
Echo Please Press "d"
xcopy "C:/Folder" "C:/Folder2"
exit
                        
                    I hope this is what you're looking for...
Just plug this command into your batch file
xcopy "copy from where" "copy to where"
type: xcopy /? to get a list of all the possible switches
example: xcopy /h /e /c /k "\\pcname\share\directory\subdirectory" "C:\documents and settings\jmklss"
            Just plug this command into your batch file
xcopy "copy from where" "copy to where"
type: xcopy /? to get a list of all the possible switches
example: xcopy /h /e /c /k "\\pcname\share\directory\subdirectory" "C:\documents and settings\jmklss"
                
        
                    xpcman
    
        
                    Posts
            
                
            19528
                
                            Registration date
            Wednesday October  8, 2008
                            Status
            Contributor
                            Last seen
            June 15, 2019
            
            
                    1,824
    
    
                    
Oct 15, 2008 at 04:59 PM
    Oct 15, 2008 at 04:59 PM
                        
                    Why not use SyncToy from Microsoft? 
check this link
https://docs.microsoft.com/en-us/archive/blogs/
            check this link
https://docs.microsoft.com/en-us/archive/blogs/
                        
                    try xcopy source destination /D parametr
/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.
also check link
https://www.computerhope.com/xcopyhlp.htm
            /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.
also check link
https://www.computerhope.com/xcopyhlp.htm
