How move files through text (base64, etc)?

1

0

Why don't these work when trying to copy a file from one location to another?

1) Base64 encode the file at source, write (binary or ascii) base64 decoded at destination.

2) Open file in notepad, copy/paste contents into destination.

Is there a way to move a file as text with the clipboard? Example of use environment: transferring files over remote desktop without enabling shared local drives.

Edit - Just to clarify, I'm talking about any type of file, not just text (zip, for instance).

wes

Posted 2011-02-22T15:54:12.447

Reputation: 645

Answers

1

What kind of "Remote Desktop" -software do you use?

Are both machines the same OS, which OS?

If for example both are Windows machines and you use Microsoft's Remote Desktop, then you can simply copy text on your machine and paste it into the remote machine. (I just tested this from OS X to Windows)

The same features should apply for OS X machines and different OS'es over VNC.

Update

I tried this myself from OS X to windows through Microsoft's RDC.

deiga

Posted 2011-02-22T15:54:12.447

Reputation: 358

I'm using the built-in Microsoft client, and in this particular case I am on 32-bit XP with a remote session to 32-bit Server 2003 R2. Because text is the only thing that will copy/paste (files don't), I am trying to encode the remote files as text and then copy/paste them to my local machine. – wes – 2011-02-22T16:39:05.497

What base64 en/decoder do you use? – deiga – 2011-02-22T16:41:06.947

I had been trying Python's base64 module: b64encode, b64decode. Example: base64.b64encode(open('myfile.zip').read()) and open('myfile.zip', 'w').write(base64.b64decode('<previous result>'))

– wes – 2011-02-22T16:42:19.330

Hmm, can't test python on any target machine now, so don't know why that doesn't work. I don't see any flaws, though. Updated the answer. @wes – deiga – 2011-02-22T17:03:46.450

Alright, well your edit worked for me even on an encrypted 7z, so at least I know this is possible and I just need to tweak my implementation. Thanks! – wes – 2011-02-22T17:27:11.053