How can I copy binary data in Windows (preferably with Notepad++)?

16

3

I want to duplicate some binary data. The normal Ctrl+C command doesn't work in my editor (Notepad++), it copies data only up to the first NUL char. Is there any workaround?

Felix Dombek

Posted 2011-10-20T17:25:26.610

Reputation: 1 729

3

The way data is stored in the clipboard depends on how the application is using the clipboard API. Notepad++ is a text editor, so it probably stores content as text. If you view the content in some hex editor, it'll probably let you copy it using one of the other standard types (and possibly other registered types). To get a full answer, you'd better provide more details, like the source of the binary data and the target.

– eran – 2011-10-20T21:31:16.287

Answers

19

In the Edit menu of Notepad++ (I'm using v5.9.2) under Paste Special there are actions to Copy, Cut, and Paste Binary Content.

Submenu of Paste Special in Edit menu of Notepad++

JustinStolle

Posted 2011-10-20T17:25:26.610

Reputation: 1 195

0

The Notepad++ MIME Tools plugin and Base64 Encode/Decode feature can be used to copy small binary files (typically small jar or zip files) between remote systems using the clipboard.

  1. Open the Binary file binary1.bin in Notepad++
  2. Edit -> Select All (Ctrl+A)
  3. Plugins -> MIME Tools -> Base64 Encode
  4. Edit -> Select All (Ctrl+A)
  5. Edit -> Copy (Ctrl+C)
  6. Edit -> Undo (Ctrl+Z)
  7. Move focus to a new Notepad++ tab
  8. Edit -> Paste (Ctrl+v)
  9. Edit -> Select All (Ctrl+A)
  10. Plugins -> MIME Tools -> Base64 Decode
  11. File -> Save As... binary2.bin

Plugins -> MIME Tools -> Base64 Encode selected Plugins -> MIME Tools -> Base64 Decode selected

Ryan

Posted 2011-10-20T17:25:26.610

Reputation: 151