DOS33-perl/dos33delete.pl

34 lines
521 B
Perl
Raw Permalink Normal View History

2019-01-17 12:53:56 +00:00
#!/usr/bin/perl -w
#
# dos33delete.pl:
#
# Utility to delete a file on an Apple II DOS 3.3 disk image.
#
# 20190116 LSH
#
use strict;
use DOS33;
2019-01-17 14:09:22 +00:00
my $debug = 0;
2019-01-17 12:53:56 +00:00
while (defined $ARGV[0] && $ARGV[0] =~ /^-/) {
# Debug
if ($ARGV[0] eq '-d') {
$debug = 1;
shift;
2019-01-17 19:01:34 +00:00
} else {
die "Unknown command line argument $ARGV[0]\n";
2019-01-17 12:53:56 +00:00
}
}
2019-01-17 13:50:09 +00:00
my $dskfile = shift or die "Must supply .dsk filename\n";
my $filename = shift or die "Must supply filename (on disk image)\n";
2019-01-17 12:53:56 +00:00
delete_file($dskfile, $filename, $debug);
1;