{"id":199,"date":"2013-07-14T07:55:17","date_gmt":"2013-07-14T12:55:17","guid":{"rendered":"http:\/\/appleii.ivanx.com\/a2cloud\/?p=199"},"modified":"2023-09-10T12:07:50","modified_gmt":"2023-09-10T17:07:50","slug":"a2cloud-transfer-files","status":"publish","type":"post","link":"https:\/\/appleii.ivanx.com\/a2cloud\/a2cloud-transfer-files\/","title":{"rendered":"17. Transfer files"},"content":{"rendered":"<p>If you&#8217;ve got files on your Pi that aren&#8217;t inside one of your viritual disks, and you want to transfer them to your Apple II, you&#8217;ve got a few options.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\">Archive files:<\/span><\/p>\n<p>If it&#8217;s an archive file, you can (and perhaps should) expand it directly on the Pi, as explained in <a title=\"A2CLOUD: working with archives and disk images\" href=\"https:\/\/appleii.ivanx.com\/a2cloud\/?p=164\">A2CLOUD: working with archives and disk images<\/a>. Otherwise, use one of the cool moves below, and then expand it with ShrinkIt or the appropriate program on the Apple II.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\">Copy a file into a disk image<\/span><\/p>\n<p><code>acmd -c fileToBeCopied imageFileName<\/code><\/p>\n<p>You can then use <code>vsd1<\/code> or <code>vsd2<\/code> to access the image file, or, alternatively, transfer it to a floppy with ADTPro.\u00a0If you want to copy a file directly to a disk image already in a virtual drive, use <code>$VSD1<\/code>\u00a0or <code>$VSD2<\/code> for <code>imageFileName<\/code>. <em>You must immediately type <code>vsdsync<\/code> if you modify an image currently assigned to a virtual drive.<\/em><\/p>\n<p>If you want to specify a different name and\/or file type, you can use the long form:<\/p>\n<p><code>acmd -p imageFileName APPLE2.FILENAME fileType auxType &lt; fileToBeCopied<\/code><\/p>\n<p><code>fileType<\/code> should be a three-letter name (e.g. TXT), or a numeric type (e.g. 255 or \\$E0). <code>auxType<\/code> is also needed for file types that require it (e.g. BIN), and can be either decimal, or hexadecimal if preceded with \\$. You can use \\$2000 for <code>auxType<\/code> if you&#8217;re not sure.\u00a0If you want the file to go into a ProDOS subdirectory, you can specify the path as part of <code>APPLE2.FILENAME<\/code>\u00a0(but do not include the volume name); any subdirectories that don&#8217;t already exist will be created.<\/p>\n<p>(This is a slightly modified version of AppleCommander&#8217;s normal -p option: the file type and ProDOS file name are optional, the file name is checked to make sure it&#8217;s ProDOS-compatible, and any existing file of the same name within the image is first deleted.)<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\">Transfer a file from your Pi to your Apple II<\/span><\/p>\n<p>You can transfer a file to be saved on a local or virtual disk by using the YMODEM protocol. To send one or more files with YMODEM, type:<\/p>\n<p><code>sb fileToBeTransferred1 fileToBeTransferred2 fileToBeTransferred3 <\/code>(etc)<\/p>\n<p>Once started, you will need to tell ProTERM or Z-Link to receive YMODEM. In ProTERM, choose YMODEM from the Receive menu; in Z-Link, type open-apple-downarrow, then option 4. In either one, accept the default options (unless you want to change them), and the files should transfer. If for whatever reason they don&#8217;t, and you can&#8217;t get access to the Linux shell prompt again, type ctrl-X until the prompt reappears.\u00a0Transfer may be slow at the default 4800 baud rate; I&#8217;ll explain how to increase the baud rate in the next post.<\/p>\n<p>If you are using ProTERM, you can also try ZMODEM by using <code>sz<\/code> instead of <code>sb<\/code>. ZMODEM is a more efficient protocol than YMODEM, it can auto-start, and it can recover from incomplete transfers, but those are less important in a direct-attached (rather than dial-up) situation, and I haven&#8217;t had as much success with it as I have had with YMODEM.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\">Transfer a file from your Apple II to your Pi<\/span><\/p>\n<p>You can also go in the other direction &#8212; from your Apple II to the Pi. Type\u00a0<code>rb<\/code>\u00a0(for YMODEM)\u00a0then tell ProTERM or Z-Link to send YMODEM. (If you prefer to send ZMODEM from ProTERM, just do that, and the Pi will automatically start receiving; you don&#8217;t need to type a command first.)<\/p>\n<p>Another option is to save a file to a virtual disk &#8212; or transfer a real floppy using ADTPro &#8212; and then copy files out of the disk image on the Pi with this command:<\/p>\n<p><code>acmd -g imageFileName APPLE2.FILENAME<\/code><\/p>\n<p>If you saved to the virtual disk, you can type\u00a0<code>$VSD1<\/code> or <code>$VSD2<\/code> for imageFileName.<\/p>\n<p>acmd (AppleCommander) has some smarts, and it can translate (or &#8220;export&#8221;, as it prefers to say) from various Apple II file formats into modern formats. If you want it to give that a shot, use <code>-e<\/code> instead of <code>-g<\/code> above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve got files on your Pi that aren&#8217;t inside one of your viritual disks, and you want to transfer them to your Apple II, you&#8217;ve got a few options. &nbsp; Archive files: If it&#8217;s an archive file, you can (and perhaps should) expand it directly on the Pi, as explained in A2CLOUD: working with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5,2,4],"tags":[],"_links":{"self":[{"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/posts\/199"}],"collection":[{"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":43,"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":876,"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/posts\/199\/revisions\/876"}],"wp:attachment":[{"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appleii.ivanx.com\/a2cloud\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}