AminetAminet
Search:
82050 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/batch/DelZero.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Set filesize to 0 (zero) THEN delete it.
Author:Msi Software "http://home.sol.no/~msi/"
Uploader:Roger Hågensen <emsai online no>
Type:util/batch
Version:40.1
Architecture:m68k-amigaos
Distribution:Freely Distributable Freeware
Date:1998-10-19
Download:http://aminet.net/util/batch/DelZero.lha - View contents
Readme:http://aminet.net/util/batch/DelZero.readme
Downloads:1150
                            DelZero v40.1
                          © Msi Software 1998
               FDF - Freely Distributable Freeware - FDF


What's this?

DelZero is a AmigaOS 2.x/3.x DOS util
that will change the size of a file to zero,
then attempt to delete it.

Why do I need this?

Let's say you are _me_, and one day you managed to REALLY fill up your
hard disk, you get an error the disk is full.
But for some reason the system is unable to remove the uncomplete file,
mainly due to the hard disk being so full that it can't change
the disk root to tell the system the file has been deleted.
And thus you can't use C:Delete because it need a functioning root block,
and programs like DiskSalv and QuarterBack Tools etc.
didn't work in my situation (perhaps later versions can handle this).

So I wondered, hey what if I change the size of the file,
fool the system into thinking the file is smaller, perhaps even 0 bytes.
That's when I checked the excellent Amiga Intern manual,
and found a AmigaDOS routine that allow me to do just that.
Thus Delzero was born.
After programming and compiling my little tool in my Ram: disk :-)
I used it and tataaa, the annoying file became 0 bytes in length,
and I was able to use C:Delete to remove the offending file.

It may depend on the filesystem you use,
but this COULD happen to you as well,
so never fill your harddrive to the last byte,
since it could complain to have no room to change the disk root
bitmap block (it contains info on the disks files)

A delete seems to need reordering of the root bitmap,
while a filesize change just change a size value or similar.
At least DelZero works, and saved me from formatting my HD,
or formating it and restoring it selecting all files/dirs
except the bad file..

Since the initial version DelZero got it's DelZero name,
and is able to delete the file itself (no need to use C:Delete for this)
it has an option to disable the delete so you can use
your favorite delete util instead.
And messages can be silenced with a QUIET option,
and file that are delete/write protected can be changed as well
with the FORCE option (resets the protection bits of the file as well).

Usage: DelZero file [nodel] [quiet] [force]

       file is the filename of the file to change to 0,
       or to delete.
       NODEL is a switch telling the program to not delete the file
             but leave it at a size of 0 bytes.
       QUIET will tell the program not to display any messages.
       FORCE will change the protection bits to enable delete/sizechange,
             in case the file was write/delete protected.



Disclaimer!
This software may be freely distributed and used
as long as no profit is made on it,
distribution/handling fees are allowed as long as they are moderate.
Aminet, Fred Fish, Amiga Magazines and naturally Amiga Inc.
have my permission to use DelZero as they see fit.

This software was made with AmigaE v3.3a from Wouter van Oortmersen.

Msi Software is a trademark of Roger Hågensen.
Amiga is a trademark of Amiga Inc.
All other trademarks/names/products are those of their respective owners.

History!

 v40.1 - 10.Oct.1998
         Initial release!


Roger Hågensen - Msi Software

Email: "Msi Software <emsai at online.no>"
  WWW: "http://home.sol.no/~msi/"


Contents of util/batch/DelZero.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 1663    3526  47.2% -lh5- c6c2 Oct 10  1998 DelZero.readme
[generic]                 1125    1768  63.6% -lh5- 115d Oct 10  1998 DelZero/delzero
[generic]                 1573    3281  47.9% -lh5- 5111 Oct 10  1998 DelZero/delzero.doc
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         3 files    4361    8575  50.9%            Oct 19  1998

Aminet © 1992-2017 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>