Copy

Description

This command will copy data from an open file to another open file. Requirements: Two files must be open, one for reading, and the second for writing. e.g.

O 1 R /sourcefile.txt
O 2 RW /destfile.txt

Copy File will copy from the current location in the source file, up to “num” bytes if specified, to the destination file (starting at the destination's current location).

Note

You can interrupt the transfer at any time by sending «ESC» (ASCII 27, HEX 0x1B).


Format

B fh1 fh2 [num]


Parameters

  • fh1/fh2 is a file handle (1 - 4). Use the Free Handle command to get a free file handle.
  • num is the number of bytes to copy from fh1 to fh2. If num is not given, or is greater than the size of fh1, then the entire contents of fh1 is copied.

Response Format

NULL | response | Enn

response depends on the C setting shown below.

C = 0:

NULL

C = 1:

#########...####

C = 2:

nn..nn bytes copied at r..rr bytes/second

C = 3:

#####...####nn..nn bytes copied at r..rr bytes/second

Example

To copy 200 bytes from the current location of handle 1 to handle 2:

B 1 2 200

To copy the entire source file to the destination file:

O 1 R /sourcefile.txt
O 2 RW /destfile.txt
B 1 2

To copy 600 bytes from position 12000 of handle 1, to handle 3, starting at position 50000:

O 1 R /sourcefile.txt
O 3 RW /destfile.txt
J 1 12000
J 3 50000
B 1 3 600

To copy the entirety of handle 1 to the end of handle 2 (appended):

O 1 R /sourcefile.txt
O 2 RW /destfile.txt
J 2 E
B 1 2

or (note that the destination file is opened for append)

O 1 R /sourcefile.txt
O 2 A /destfile.txt
B 1 2
  • Bookmark at
  • Bookmark "Copy" at del.icio.us
  • Bookmark "Copy" at Digg
  • Bookmark "Copy" at Google
  • Bookmark "Copy" at StumbleUpon
  • Bookmark "Copy" at Technorati
  • Bookmark "Copy" at Facebook
  • Bookmark "Copy" at Twitter
  • Bookmark "Copy" at Slashdot
  • Bookmark "Copy" at Yahoo! Bookmarks
  • Bookmark "Copy" at Furl
  • Bookmark "Copy" at Reddit
  • Bookmark "Copy" at Ask
  • Bookmark "Copy" at BlinkList
  • Bookmark "Copy" at blogmarks
  • Bookmark "Copy" at Ma.gnolia
  • Bookmark "Copy" at Netscape
  • Bookmark "Copy" at ppnow
  • Bookmark "Copy" at Rojo
  • Bookmark "Copy" at Shadows
  • Bookmark "Copy" at Simpy
  • Bookmark "Copy" at Socializer
  • Bookmark "Copy" at Spurl
  • Bookmark "Copy" at Tailrank
  • Bookmark "Copy" at Live Bookmarks
  • Bookmark "Copy" at Wists
  • Bookmark "Copy" at Yahoo! Myweb
  • Bookmark "Copy" at BobrDobr
  • Bookmark "Copy" at Memori
  • Bookmark "Copy" at Faves
  • Bookmark "Copy" at Favorites
  • Bookmark "Copy" at Newsvine
  • Bookmark "Copy" at myAOL
  • Bookmark "Copy" at Fark
  • Bookmark "Copy" at RawSugar
  • Bookmark "Copy" at LinkaGoGo
  • Bookmark "Copy" at Mister Wong
  • Bookmark "Copy" at Wink
  • Bookmark "Copy" at BackFlip
  • Bookmark "Copy" at Diigo
  • Bookmark "Copy" at Segnalo
  • Bookmark "Copy" at Netvouz
  • Bookmark "Copy" at DropJack
  • Bookmark "Copy" at Feed Me Links
  • Bookmark "Copy" at funP
  • Bookmark "Copy" at HEMiDEMi
ummc/documentation/command/copy.txt · Last modified: 2009/10/27 17:10 by bhagman
Valid CSS Recent changes RSS feed Valid XHTML 1.0