![]() ![]() Scheduler would have eventually deleted all my backups.Hello, I ran a robocopy command to copy all the files from one location to another. Maybe this is not an issue, but I do have a routine that deletes based on todays date, then I have a separateīackup software, which I just found was failing, so it occured to me that the delete batch routine that I put in Windows This then would always have 14 days worth Still only delete from 9-25-2014 14 days back, instead of using 9-27-2014. so say after 9-26-2014 the copy option is not working, but theĭelete is kicking in, then only 14 days back from 9-25-2014 would be deleted, then also on 9-27-2014 it would So if something fails but the delete is still working it would only delete from 14 days back from If I do not catch this then it would eventually delete all backups. I want to use the earliest file date, because if I am on vacation or just not paying attentionĪnd the system fails, then the delete will not continue deleting files based on todays date. So in theĮxample above, I want to get the created date for “Data Files RC 9_25_2014.zip” then count back 14 daysĪnd delete all zipped files older than 14 days. Not the date added to the file name, and delete any zipped files older than 14 days. Then I want to look at the earliest date in the “C:\Laptop Backups” directory based on the created date, I want to then have “Data Files RC” in “C:\Laptop Backups” zipped with date on end of the file How to get machine serial number, product number using command prompt How to install HP LaserJet 1010 driver in Win7 Total Copied Skipped Mismatch FAILED Extras Options : *.* /S /E /COPYALL /MOV /ZB /R:1000000 /W:30ġ00% New File 1709 Copy from Ext-HD to HD.batġ00% New File 2711 Copy from HD to Ext-HD.bat ROBOCOPY :: Robust File Copy for Windows :: Version XP010 C:> robocopy "E:\source" "E:\destination" /E /ZB /MOV /COPYALL In this example all files and folders (including empty ones) will be copied from folder1 to folder2 directory.Ĭopy all the files from source and delete all files from source drive but don’t delete folder. In this example all files would be copied from folder1 to folder2 but not directories. txt files would be copied from folder1 directory to folder2 directory. Some More Examples: robocopy c:\folder1 c:\folder2 *.txt I have made it to sync my data, if you don’t want to delete any files from destination drive then don’t use /PURGE option. LOG:file :: output status to LOG file (overwrite existing log).Ībove command will sync your data from source to destination it means if you have deleted some data from your hard drive then it will also remove from destination drive. TEE :: output to console window, as well as the log file. X :: report all eXtra files, not just those selected. PURGE :: delete dest files/dirs that no longer exist in source. COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU). ZB :: use restartable mode if access denied use Backup mode. E :: copy subdirectories, including Empty ones. Meaning of switches used in above command explained below. ![]() C:\>robocopy "D:\Folder1" "H:\BackupFolder1" /E /ZB /X /PURGE /COPYALL /TEE /LOG: E:\Copy_from_HD_to_Ext_HD.log C:\>robocopy /? // Help for any commandįollowing command i have used to sync my folders and files. ![]() Here i have marked all the feature with grey color and highlighted some feature which i have used to sync my d: drive to destination drive in which the data has to be copied. Type robocopy /? to get to know about feature provided by Robocopy command line tool. Start > Run > type cmd and press enter to open command prompt window. Install the rktool.exe and follow the follow ing steps to copy new and changed files o nly. Windows NT, Windows 2000, Windows Server 2008, Windows Vista, Windows 7
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |