Author: Copyright (C) 2014 by CiderPress authors

Copy and Paste

CiderPress can use the Windows clipboard to copy Apple II files around. You can copy files from any disk image or file archive that CiderPress can open, and paste them into NuFX (ShrinkIt) archives and writeable disk images (currently DOS, ProDOS, and Pascal are supported).

To copy files, open the archive, select the files you want from the file list, and use "Edit->Copy". (Or, right click and choose "Copy". Or hit Ctrl-C.) The files will be extracted from the archive or disk image and placed on the Windows clipboard.

Next, open the archive where you want the files to go. If it's a ProDOS disk image, select the directory where you want the files to appear. Select "Edit->Paste". (Or right click and choose "Paste". Or hit Ctrl-V.) The files will be added. You can also have two copies of CiderPress open, and copy from one and paste to the other.

If you're pasting to a disk image with sub-volumes, or pasting to a ProDOS disk with subdirectories and didn't select a subdirectory, you will be asked to choose where the files will go. This is similar to the way "add files" works -- if the destination isn't obvious, CiderPress will ask.

Copying and and pasting is meant to be simple, but there's a lot of complexity underneath it. Here are some things you should be aware of:

- Files copied from ProDOS volumes are extracted with their full paths, e.g. "subdir1:subdir2:foo.txt". You may choose to strip the subdirectories off with a global preference. This determines whether pasting "subdir1:subdir2:foo.txt" into "subdir3" yields "subdir3:foo.txt" or "subdir3:subdir1:subdir2:foo.txt". Files pasted to DOS or Pascal disks have their paths stripped automatically.
- Unlike the "add files" approach, which prompts you when new filenames clash with existing files, "paste" automatically handles conflicting files for you. If you paste a file called "FOO" to the same disk image twice, the second one will be called "FOO1". If you paste files with the same name multiple times to a NuFX archive, you will simply have multiple entries called "FOO", because NuFX allows duplicate filenames.
- Files converted between different operating systems will have their file types converted. The mapping of DOS and Pascal types to ProDOS types is shown here. Files pasted to DOS disks that don't have a direct file type conversion will become 'B' if they are less than 64K, or 'S' if they are more. ProDOS "SRC" files become 'T'. Most files converted to Pascal disks become "PDA" (generic data). CiderPress does not currently convert in and out of Pascal Text (PTX) format.
- DOS text files use "high ASCII" format. Text files pasted to and from DOS volumes will be converted appropriately. (Text files copied from one DOS volume to another are left alone, not converted twice.) Because all Apple II formats use carriage returns to indicate the ends of lines, no end-of-line conversion is done when pasting files.
- The comments stored in NuFX archives are not copied with the files. (This may be fixed in a future release.)
- Copying and pasting files from Windows Explorer is not currently supported. You can, however, paste into an application such as Notepad to get a tab-delimited copy of the file list (pathname, file type, aux type, etc). If you paste this into a spreadsheet, such as Microsoft Excel, each field gets its own row and column.
- Selecting a directory on a ProDOS disk copies the directory, not the directory and all of its contents. Pasting the directory into a ProDOS disk image creates an empty directory. If a directory with that name already exists, nothing happens. NuFX archives do not store directories, so pasting a directory into a NuFX archive has no effect. You cannot copy the volume directory of a ProDOS disk, though there is no harm in trying.
- Resource forks are not pasted to DOS or Pascal disks. If you paste a forked file, only the data fork is added. (All forked files on ProDOS disks have a data fork, even if it's just an empty one, but forked files in NuFX archives may have just the resource fork. Pasting a forked file to a DOS disk may or may not actually create a file.)
- Some DOS games were stored in 'B' files with a short "loader" segment. The "loader" would start immediately and load the rest of the game itself. CiderPress obeys the shorter length value, and as a result will not copy the entire file (as evidenced by the pasted file being significantly smaller than the original).
- Files are copied and pasted in the order in which they appear in the file list. You can alphabetize your disks by sorting the list by pathname and copying & pasting the files to a new disk.
- Damaged files are not copied to the clipboard.
- In Win98, copying 16MB or more to the clipboard causes the system to lock up. CiderPress therefore limits you to copying less than 16MB of data under Win98/ME. Because of overhead added to the clipboard data, it's not possible to copy 16MB files (the largest possible under ProDOS) to the clipboard.