Framework EDI Reference. Methods and Properties
ediFileSystem. DecodeFile

Decodes the contents of a file to a target file.

Syntax:

Parameters:

Returns

Returns 1 if the operation is successful; otherwise the operation returns zero.

Remarks

There is no check made as to whether the file to encode has previously been encoded or not; FREDI will assume the contents of the file to be already encoded.  If the file has not been previously encoded, the decoding operation can return as successful but the resulting target file can contain garbage data.  Also, the same encoding mechanism that was used to encode the source file must be used to decode, otherwise the resulting target file can contain garbage data.

 

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oFileSystem As Fredi.ediFileSystem

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get file system object.
Set oFileSystem = oEdiDoc.GetFileSystem

' Decode an encoded file.
oFileSystem.DecodeFile App.Path & "\EncodeBase64.Txt", EncodeType_Base64, App.Path & "\DecodedFile.Txt"

MsgBox "Done"

Samples