mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-10-31 16:04:51 +00:00
Allow extraction to a file name for -e and -g
This commit is contained in:
parent
b52df7745b
commit
b53a6ba61c
@ -102,7 +102,7 @@ CreateDirectoryMenuItem=Create Directory...
|
|||||||
CommandLineErrorMessage = Error: {0}
|
CommandLineErrorMessage = Error: {0}
|
||||||
CommandLineNoMatchMessage = {0}: No match.
|
CommandLineNoMatchMessage = {0}: No match.
|
||||||
CommandLineStatus = {0} format; {1} bytes free; {2} bytes used.
|
CommandLineStatus = {0} format; {1} bytes free; {2} bytes used.
|
||||||
CommandLineHelp = AppleCommander command line options [{0}]:\n-i <imagename> [<imagename>] display information about image(s).\n-ls <imagename> [<imagename>] list brief directory of image(s).\n-l <imagename> [<imagename>] list directory of image(s).\n-ll <imagename> [<imagename>] list detailed directory of image(s).\n-e <imagename> <filename> export file from image to stdout.\n-x <imagename> [<directory>] extract all files from image to directory.\n-g <imagename> <filename> get raw file from image to stdout.\n-p <imagename> <filename> <type> [[$|0x]<addr>] put stdin\n in filename on image, using file type and address [0x2000].\n-d <imagename> <filename> delete file from image.\n-k <imagename> <filename> lock file on image.\n-u <imagename> <filename> unlock file on image.\n-n <imagename> <volname> change volume name (ProDOS or Pascal).\n-cc65 <imagename> <filename> <type> put stdin with cc65 header\n in filename on image, using file type and address from header.\n-geos <imagename> interpret stdin as a GEOS conversion file and\n place it on image (ProDOS only).\n-dos140 <imagename> create a 140K DOS 3.3 image.\n-pro140 <imagename> <volname> create a 140K ProDOS image.\n-pro800 <imagename> <volname> create an 800K ProDOS image.\n-pas140 <imagename> <volname> create a 140K Pascal image.\n-pas800 <imagename> <volname> create an 800K Pascal image.\n-convert <filename> <imagename> [<sizeblocks>] uncompress a ShrinkIt or Binary\n II file; or convert a DiskCopy 4.2 image into a ProDOS disk image.
|
CommandLineHelp = CommandLineHelp = AppleCommander command line options [{0}]:\n-i <imagename> [<imagename>] display information about image(s).\n-ls <imagename> [<imagename>] list brief directory of image(s).\n-l <imagename> [<imagename>] list directory of image(s).\n-ll <imagename> [<imagename>] list detailed directory of image(s).\n-e <imagename> <filename> [<output>] export file from image to stdout\n or to an output file.\n-x <imagename> [<directory>] extract all files from image to directory.\n-g <imagename> <filename> [<output>] get raw file from image to stdout\n or to an output file.\n-p <imagename> <filename> <type> [[$|0x]<addr>] put stdin\n in filename on image, using file type and address [0x2000].\n-d <imagename> <filename> delete file from image.\n-k <imagename> <filename> lock file on image.\n-u <imagename> <filename> unlock file on image.\n-n <imagename> <volname> change volume name (ProDOS or Pascal).\n-cc65 <imagename> <filename> <type> put stdin with cc65 header\n in filename on image, using file type and address from header.\n-geos <imagename> interpret stdin as a GEOS conversion file and\n place it on image (ProDOS only).\n-dos140 <imagename> create a 140K DOS 3.3 image.\n-pro140 <imagename> <volname> create a 140K ProDOS image.\n-pro800 <imagename> <volname> create an 800K ProDOS image.\n-pas140 <imagename> <volname> create a 140K Pascal image.\n-pas800 <imagename> <volname> create an 800K Pascal image.\n-convert <filename> <imagename> [<sizeblocks>] uncompress a ShrinkIt or Binary\n II file; or convert a DiskCopy 4.2 image into a ProDOS disk image.
|
||||||
CommandLineSDKReadOnly = SDK, SHK, and DC42 files are read-only. Use the convert option on them first.
|
CommandLineSDKReadOnly = SDK, SHK, and DC42 files are read-only. Use the convert option on them first.
|
||||||
CommandLineDC42Bad = Unable to interpret this DiskCopy 42 image.
|
CommandLineDC42Bad = Unable to interpret this DiskCopy 42 image.
|
||||||
|
|
||||||
|
@ -61,9 +61,11 @@ import com.webcodepro.applecommander.util.TextBundle;
|
|||||||
* -ls <imagename> [<imagename>] list brief directory of image(s).
|
* -ls <imagename> [<imagename>] list brief directory of image(s).
|
||||||
* -l <imagename> [<imagename>] list directory of image(s).
|
* -l <imagename> [<imagename>] list directory of image(s).
|
||||||
* -ll <imagename> [<imagename>] list detailed directory of image(s).
|
* -ll <imagename> [<imagename>] list detailed directory of image(s).
|
||||||
* -e <imagename> <filename> export file from image to stdout.
|
* -e <imagename> <filename> [<output>] export file from image to stdout
|
||||||
|
* or to an output file.
|
||||||
* -x <imagename> [<directory>] extract all files from image to directory.
|
* -x <imagename> [<directory>] extract all files from image to directory.
|
||||||
* -g <imagename> <filename> get raw file from image to stdout.
|
* -g <imagename> <filename> [<output>] get raw file from image to stdout
|
||||||
|
* or to an output file.
|
||||||
* -p <imagename> <filename> <type> [[$|0x]<addr>] put stdin
|
* -p <imagename> <filename> <type> [[$|0x]<addr>] put stdin
|
||||||
* in filename on image, using file type and address [0x2000].
|
* in filename on image, using file type and address [0x2000].
|
||||||
* -d <imagename> <filename> delete file from image.
|
* -d <imagename> <filename> delete file from image.
|
||||||
@ -100,11 +102,13 @@ public class ac {
|
|||||||
} else if ("-ll".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
} else if ("-ll".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
||||||
showDirectory(args, FormattedDisk.FILE_DISPLAY_DETAIL);
|
showDirectory(args, FormattedDisk.FILE_DISPLAY_DETAIL);
|
||||||
} else if ("-e".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
} else if ("-e".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
||||||
getFile(args[1], args[2], true, System.out);
|
getFile(args[1], args[2], true,
|
||||||
|
(args.length > 3 ? new PrintStream(new FileOutputStream(args[3])) : System.out));
|
||||||
} else if ("-x".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
} else if ("-x".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
||||||
getFiles(args[1], (args.length > 2 ? args[2] : ""));
|
getFiles(args[1], (args.length > 2 ? args[2] : ""));
|
||||||
} else if ("-g".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
} else if ("-g".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
||||||
getFile(args[1], args[2], false, System.out);
|
getFile(args[1], args[2], false,
|
||||||
|
(args.length > 3 ? new PrintStream(new FileOutputStream(args[3])) : System.out));
|
||||||
} else if ("-p".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
} else if ("-p".equalsIgnoreCase(args[0])) { //$NON-NLS-1$
|
||||||
putFile(args[1], new Name(args[2]), args[3],
|
putFile(args[1], new Name(args[2]), args[3],
|
||||||
(args.length > 4 ? args[4] : "0x2000"));
|
(args.length > 4 ? args[4] : "0x2000"));
|
||||||
|
Loading…
Reference in New Issue
Block a user