:: CTULD.bat :: Copies Files Modified or Created Today :: to the Upload Directory, or Copies :: from the Specified Date Forward :: @ECHO OFF If no Date is Given, Today's IF "%1" == "" GOTO COPY-TODAY Files will be Copied IF NOT "%1" == "" GOTO COPY-DATE Otherwise, Files will be Copied Forward of the Date Typed :COPY-TODAY (See Text, Below) ECHO. | DATE | FIND /I "Current" > C:\BATCH\CUR-DATE.BAT ECHO @SET CUR-DATE=%%4 > C:\BATCH\CURRENT.BAT CALL C:\BATCH\CUR-DATE.BAT XCOPY *.* C:\UPLOAD /D:%CUR-DATE% < NUL Copies Files based on Today's Date ("NUL" Hides Screen Messages) GOTO END :COPY-DATE Copies Files based on XCOPY *.* C:\UPLOAD /D:%1 /-Y The Date Given at the Command Line :END ECHO. Separates the Listing CALL C:\BATCH\DR.BAT C:\UPLOAD Gives a Listing for the UPLOAD Directory to Show the Operation's Success SET CUR-DATE= Removes the Date Variable From the Environment DEL CUR-DATE.BAT Deletes the DEL CURRENT.BAT Temporary Batch Files ________
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.