the list of files to consider was built by dir /b /ON. the /ON sorts by name. since the split files were created one by one and have a name with a number which is significant for ordering it is subject to deletion first, the splitfile with 001 of the first set is deleted first. if you have 2 sets the file with _001_of the second set was not deleted. then, it goes on with _002_ .
why do you think it could be else? don't you have a working sample folder where you could see it work?
currently, the criterion to delete a file is that we have at least 2 'input_nnn_*' files, what means that we must have 2 sets of split files.
of course, you could change this, but then all files would be deleted what rarely makes sense.
Sara
AndyAinscow
Just an aside. You talk of split files. Some sorts of split (eg. compression, encryption, binary) files might require all files to be present to regenerate the original data, deleting just one means the others that are left are now junk.
I hope you have tested your idea manually before implementing an app to do this for you.
Megha Valishetra
ASKER
Ya You are right. sara
but My question is - In 1 set splits only cant we delete 1st split file? not whole set
@ Sara
Is it possible to do with different file name ...I mean...
First file and its splits , Second file and its splits are with different name ... How can we delete here applying oldest file concept
please give a sample.
Sara