Short: DayMove 1.25 - Move files (+/-)x days old Author: jthorsen@iname.com Uploader: jthorsen iname com Type: util/cli Version: 1.25 Replaces: util/cli/DayMove.lha Architecture: m68k-amigaos DayMove is email-ware, which means that if you like it I would really like to receive a mail from you telling me so. DayMove is just a small util that will let you move -x days old files from one directory to another. USAGE: DayMove [OLDER] [LIST] [QUIET] [TIME=] [ALL] NUMBER_OF_DAYS - How many days old files to move SOURCE_DIR - Source-dir DEST_DIR - Dest-dir OLDER - move only older than x-days old files, move newer is default. LIST - Do not move files, only list them. QUIET - Do not ask questions, this is smart to use in scripts where you don't want the program to wait for your response. TIME - Hours past midnight ALL - Check all subdirs. examples: --------------------------------------------------------------------------------------------- daymove 0 store:tmp/ BBS:upload/ ;This will move todays files from store:tmp/ to BBS:upload/ daymove 50 store3:tmp/ ram: OLDER LIST ;This will list files in store3:tmp/ that are older than 50 days. It can be quite smart to use the LIST switch to display the affected files before you actually start moving them, and then afterwards start daymove without the LIST switch to actually move the files. Even if the dest-dir is not used in list-mode, a valid dest-dir has to be passed as an argument, because of the argument parsing. daymove 0 ram: ram:recent/ time=5 ;Move files that were created after 05:00 today daymove 3 ram: ram:old/ time=9 older ;Move files that were created before 09:00, 3 days ago --------------------------------------------------------------------------------------------- This should be quite simple to figure out I guess, but if you are stuck feel free to send me a mail. DayMove is part of a serie of smart little tools. You should also check out the following utils released by me (in aminet/util/cli/): DayCopy DayDelete DayList SizeCopy SizeDelete SizeMove SizeList Version History: 1.25 Fixed a bug in the routine that was checking if the file was copied correctly. Thanks to Fredrik Ismyren for reporting this. 1.24 Will now skip files when the filedate is in the future. Fixed a bug when using the ALL argument 1.23 Fixed a bug in the exit-routine. 1.22 Added the 'ALL' argument. 1.21 Now uses raw-mode for input, so the input will not be put in the CON's history. Reported by Stefan Schulz 1.2 Fixed a memory-allocation-bug, that caused daymove to crash. TIME argument added, suggested by Fredrik Ismyren. 1.11 Fixed a bug in the routine testing if the file was copied ok. The destination file was deleted, instead of the source file(!) In other words v1.1 would not do anything usefull ;) 1.1 DayMove will now preserve creation-date/filecomment and protection when moving the file. But if you choose to un-protect the file from deletion, the destination will then be unprotected too. If anybody want to move a file, but still keep the file protected from deletion in the destination-drawer, please tell me so... Suggested by Fredrik Ismyren. 1.0 First public release Will check to see if the file is protected from deletion and let you decide if if you want to un-protect it. Will NOT delete the file if the copy was not successfull.