home *** CD-ROM | disk | FTP | other *** search
- .key src,dst,flg
- .def src SOURCE
- .def dst DESTINATION
- .def flg DEL_COPY
- .bra {
- .ket }
-
- c:echo >ram:datefile "Start = " NOLINE
- c:date >>ram:datefile
-
- IF {src} EQ SOURCE
- ECHO "Usage: cmpPATH <SOURCEdir> <DESTINATIONdir> [CMPONLY]"
- QUIT
- ENDIF
-
- IF NOT EXISTS {src}
- ECHO "SOURCE path does not exist"
- QUIT 20
- ENDIF
-
- IF NOT EXISTS {dst}
- ECHO "DESTINATION path does not exist"
- QUIT 20
- ENDIF
-
- IF {flg} NOT EQ CMPONLY
- FAILAT 30
-
- c:info {dst}
-
- c:echo ""
- c:echo "RELABEL {dst} to 'Test Disk'"
- c:relabel {dst} "Test Disk"
-
- c:echo ""
- c:echo "MAKE CURRENT DIRECTORY to {dst}"
-
- c:assign DST: {dst}
-
- c:protect DST:testdir RWED
- c:delete DST:testdir all QUIET
-
- c:echo ""
- c:echo "MAKE DIRECTORY on {dst}"
- c:makedir DST:testdir
- IF FAIL
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "RENAME path across directories on {dst}"
- c:rename DST:#? DST:testdir/#?
- IF FAIL
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "RENAME files back to original path"
- c:rename DST:testdir/#? DST:#?
- IF FAIL
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "SET FILE DATES on {dst} to current date"
- c:setdate DST:#?
- IF FAIL
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "SET FILE ATTRIBUTES on {dst} to 'HSPA' and clear 'RWED'"
- c:protect DST:#? HSPA
- IF FAIL
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "DELETE all files from {dst}"
- delete DST:#? all
- IF WARN
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "SET FILE ATTRIBUTES on {dst} to 'RWED'"
- c:protect DST:#? RWED
- IF FAIL
- SKIP PREEXIT
- ENDIF
-
- c:echo ""
- c:echo "DELETE remaining files from {dst}"
- delete DST:#? all
- IF WARN
- SKIP PREEXIT
- ENDIF
-
- c:info {dst}
-
- c:echo ""
- c:echo "COPY {src} to {dst}"
- c:copy {src} to {dst} all
-
- c:info {dst}
-
- c:FAILAT 5
- ENDIF
-
- c:echo ""
- c:echo "COMPARE {src} to {dst}"
- c:cmp {src} {dst} all
-
- LAB PREEXIT
- c:assign DST:
-
- c:echo >>ram:datefile "End = " NOLINE
- c:date >>ram:datefile
- c:type ram:datefile
- c:QUIT