|
Answer» I want to copy maximum size file one directory to another and delete minimum file size one directory using batch file. Can ANYONE help me? yes, let me dash my magic wand and make a script appear! im sorry, but i have noo idea what you mean by "maximum size file" or to delete "minimum file size one directory"Homework?
In a For loop use dir /os to sort files in ascending size order (smallest first) and delete the first file.
In a second For loop use dir /o-s to sort files in DESCENDING size order (largest first) and copy the first file.Thanks for your REPLY... let me explain why I need it.. I have a oracle database server and a scheduler creates dumps every 6 hours... and its quite large around 1.2 gb and every time the dmp file is created with a filename like 12-AUG-2009.dmp. As we have a storage server where I have a disk quota of 4 GB only I want to transfer last two BACKUPS to my storage server deleting the older versions using scheduler. Can you help me?
|