Print Page | Close Window

Binary file transfer

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: File Transfer
Forum Description: Help with uploading & downloading database and document files
URL: https://forum.asent.com/forum_posts.asp?TID=1410
Printed Date: March 26 2026 at 8:51pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Binary file transfer
Posted By: pierre
Subject: Binary file transfer
Date Posted: September 26 2008 at 4:07am
Is there any way to use FT or FTD to transfer a binary file located on the D3 server's local file system (in windows) to my local workstation? The transfer actually works but the file received is altered somehow and the binary is no longer good.

The scenario is as follows:

I have a master XL sheet with macros in it. It is stored on the D3 server in windows. I want to send that file to my local workstation.

The transfer works but the transferred file is not useable because the binary gets altered during the transfer. I did set FT/FTD to binary.

Thanks



Replies:
Posted By: PSchellenbach
Date Posted: October 03 2008 at 9:29am
Hi Pierre -

D3 is the problem here. While AccuTerm's Kermit utility is binary-clean, D3 is not. I think that when Kermit READs the item from the local file system it converts CHAR(10) in the source file to CHAR(254), and probably discards any CHAR(13) in the source file. This generally corrupts the binary data. Even if you disable the conversion, I don't think D3 BASIC will allow CHAR(255) in string variables, so it still won't work.

What you are trying to do is possible in Universe or QM, and maybe other platforms, but just not possible in D3 or mvBase.

Thanks,

Pete


Posted By: Stefano
Date Posted: October 03 2008 at 10:10am
The job can be accomplished in two steps, without using FT/FTD, but it requires a shared folder on server.

Suppose C:\Temp is shared, and accessible by your PC, on D3/Windows server (D3server)

The skeleton is:

   Step 1:
      DATA '(NT_BIN:C:/Temp sheet.xls'
      EXECUTE 'COPY pickfile binaryitem (O'

   Step 2
      cmnd='Copy \\D3server\C\Temp\fileneme C:\Localfolder\sheet.xls'
      CRT CHAR(27):CHAR(2):">":cmnd:CHAR(13):

Please make filename unique (eg: appending the term line number)

I understand I don't directly answer to Your question and this method is not appliable to all scenarios.

Stefano



Posted By: pierre
Date Posted: October 03 2008 at 11:35am
You're right that did not answer my question but I appreciate the help.

In my citualtion, I do not have access to the local DB drive and cannot create a map drive. To solve my problem I'd have to use ftp.

Any one out there can suggest an ftp solution I can use within accuterm? maybe using VBA!

Thanks


Posted By: TonyG
Date Posted: October 15 2008 at 8:36am
Pierre, the source code for AccuTerm transfers is on your system. You should be able to modify it to read from NT_BIN:filename.

As far as FTP, I have had a lot of success with cURL.

Another way to do this is to BASE64-encode the file on your system, transfer, then decode it on the target system.

HTH

-------------
Tony Gravagno Nebula Research & Development
TG@ Nebula-RnD . com
http://Nebula-RnD.com/blog
http://Twitter.com/TonyGravagno
http://groups.google.com/group/mvdbms
https://www.linkedin.com/groups/64935



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net