Even if you did this, the copying process is already halted immediately before that message is presented.
You need to be in the habit of knowing that you have sufficient disk space before commencing the copy, and it would make more sense if that copy is being done in a script to have the script logic to query the size of the destination and compute the size of the sources before even starting to copy.
I'm still trying to even wrap my head around this request.
It is very seldom done to leave any significant unallocated space on most disc drives these days, as it's a "dead resource" in that state. If you're getting an "insufficient space" message there is generally nowhere else that one could even allocate space to extend a partition even if one wanted to do so. If that unallocated space is not contiguous with the partition that's run out of space things get even more complicated.
Of course, this could be a situation where the unusual practice of leaving large chunks of unallocated space on a disc drive is being done. But unless I were to hear otherwise, I will not presume that's so.
One does space planning prior to needing it, not on the fly, when it comes to disk storage.
Thank for all but my problem is not solved yet. Let I explain my problem in detail.
I am using "Iperius Backup" tool for making windows image backup of system partition. This software is good in sense that it can make backup in windows image format (.vhd or .vhdx) without any issues/errors and according to more selected schedule than Windows builtin backup process. While backing up, the backup partition is being filled with passage of time and ultimately Backup program pops up "The backup discarded due to insufficient disk space". It is because the Developers of this tool did not given any option to manage backup partition space automatically. However,there is an option that I can run any executable program when backup completed every time and can start the next backup after that.
Now, I want a batch script or any other way through which I can command to backup software to format the backup partition when it failed to create backup due to insufficient disk space and next backup will be started in an empty partition. In this way, I can continue backup without manually format the backup partition.
Microsoft is itself recommending a third-party option. Virtually all of those have image managers that allow you to delete old images and, in fact, use a single file for an image which can be nuked in a script prior to kick off of the new backup, or immediately after you've determined that the new backup has completed successfully.
Any option, even a third-party one, that is using the file formats that were part of SIB to begin with is not using the most efficient storage method and should probably be replaced no matter how long one has been using it.
I am using EaseUS To Do Backup simply for ease of the User Interface (and the influence on willingness to actually take a backup using same by other members of my household). It creates those backups as a unitary file in a known folder, and you can programatically delete the prior image either before starting to take a new one or after having taken a new one if there is sufficient space for at least two.
Sir, I have also used AOMEI Backupper for backup system but now a days, its updated version has some bugs that are not fixed yet. I like AOMEI Backupper because I tested its backup image to restore on different hardware successfully, I don't know about others, which will be the best for creating backups and restore them on different hardware, I googled many of them such as Macrium Reflect , Acronis, EaseUS To Do etc but which is best, please guide
As far as I am concerned, and this is strictly my opinion, there is no "best," absent some very specific and unusual criteria being specified.
All of the major backup and restore utilities, whether in their paid or free versions, seem to do just that very well.
Tech geeks seem to love Macrium Reflect, even in its free version, because it has so many switches you can flip as far as customizing it is a twiddlers paradise. It also does its job very, very well. It does not, in my opinion, have the most user friendly interface for "your average user." The UI definitely matters in some cases, and it needs to be considered.
I have used AOMEI and Macrium in the past, and both are just fine for doing what they need to do. I finally settled on EaseUS not because it's better or best at its core function, but because the others I wanted to have using it independently to kick off on-demand backups when those are needed have the easiest time with its "For Dummies" style UI (and I hasten to add that this is not, in any way, meant as a criticism of EaseUS or the user - simpler is very often better, and under the circumstances I have prevailing it definitely is).