Jump to content

Client Resource: Encode & Decode .CSV files


Sapito Sucio

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   86
  • Joined:  04/10/12
  • Last Seen:  

Encode & Decode .CSV files


New clients are ditching some .txt based files to use .csv encoded files instead.

The .CSV files are base64 encoded, provided scripts will decode and encode ass you wish.

Both scripts will work the following way:
 

Decoder

Decoder will look for all .csv files on the folder that doesn't have "_decoded" on its filename.

Decoder will iterate over each element, decoding from base64.

Finally, generates a file with the suffix "_decoded" added to its filename.

Encoder

Encoder will look for all .csv files on the folder with "_decoded" on its filename.

Encoder will iterate over each element, encoding to base64.

Finally, generates a file with the suffix "_encoded" added to its filename.


 

  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...