// // COPYTODAY.VDM Ch. Ziemski 17.05.2001 // 06.01.2003 // // Copies all files in the current directory that has been modified today // to another directory. // Could be used as a primitive backup. // // // It uses the DOS command xcopy: // // xcopy *.* /d:date target-directory // // Attention: The xcopy command needs different syntax in the different // Windows versions! // // In NT and Win2000: /d:MM-DD-YY // In Win98 engl. : /d:MM-DD-YY // In Win98 german : /d:DD-MM-YY // // So for a german Win98 you have to change the Date() command // some lines below (see comments there). // // Since I don't have a Win95 or a WinME box handy, I can't say // which format is needed there. You have to check it by yourself. // //---------------------------------------------------------------------------- Reg_Set(104,"C:\xxx\!test") // modify to your target directory // // Tips: 1) absolute pathname (like "C:\backups") // => ONE single target for all source directories // // 2) relative path (like "backup") // => one DISTINCT target for EVERY current source directory // if(!File_Exist(@104)){ alert() // target must exist, otherwise exit return // (Maybe it's possible to create the directory here ...) } Reg_Set(103, "xcopy *.* /d:") // modify '*.*' to another mask // (and optionally) pathname (but see tips above) Out_Reg(103, APPEND) // add the date of today Date(NOMSG+NOCR) // for NT, Win2000 and engl. Win98 //Date(BEGIN+NOMSG+NOCR) // for german Win98 Out_Reg(CLEAR) Reg_Set(103, " ", APPEND) // dividing space Reg_Set(103, @104, APPEND) // add the target dir Sys(@103, DOS+SUPPRESS+SIMPLE) // do it via DOS