Avatar of Megha Valishetra
Megha Valishetra
 asked on

Is it possible to delete files one by one rather than the whole?

C

Avatar of undefined
Last Comment
Megha Valishetra

8/22/2022 - Mon
sarabande

what is the "whole" and what is "one by one".

please give a sample.

Sara
AndyAinscow

The question you give a link to, unless I totally misunderstand it, deletes files one by one - which is what you ask for in this question.
Megha Valishetra

ASKER
@ Sara
One by one means not whole set of splitted files,

Here it compares one set of splitted with other set of splitted then it deletes old set .

but I asked in 1 set of splitted files is it possible to delete old file..

consider
input_001_20170319_151024.284
input_002_20170319_151024.285
input_003_20170319_151024.286
input_004_20170319_151024.287

here input_001_20170319_151024.284 is old file it should delete first..
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Megha Valishetra

ASKER
@ AndyAinscow

Yes i asked somewhat one by one
sarabande

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?

Sara
Megha Valishetra

ASKER
Ya Sara.

Its not possible to delete within 1 set?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
sarabande

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
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Megha Valishetra

ASKER
@:AndyAinscow

Transmit and delete this what i am planning... I ll make use of all splitted files and delete old one...
SOLUTION
sarabande

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Megha Valishetra

ASKER
how do you know that it is an 'old' file if you have not copied a new set of split files to the target folder?

based on time. there is time difference in milisecond for each file
ASKER CERTIFIED SOLUTION
sarabande

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Megha Valishetra

ASKER
@ 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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.