Re: Copyfile to Anywhere Client


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Jon Sacks on June 15, 2008 at 06:13:36:

In Reply to: Re: Copyfile to Anywhere Client posted by Brian Levantine on June 14, 2008 at 16:01:04:

Here is the source:

Spath$ = Path(SourceDAB$)
SPath$ = strip(SPath$)+SourceFile$
TPath$ = "$(" + Alias$ + ")\"+DestFile$
PRINT (erasefile=TPath$,2)
FLAG = 1024+2048 !Progress bar and Overwrite existing
PRINT (CopyFile=SPath$,TPath$,FLAG)
Input (0,ResultFmt)
AX$ = SUB(AX$,2,1) + SUB(AX$,1,1) !Flip the bytes around
DX$ = SUB(DX$,2,1) + SUB(DX$,1,1) !Flip the bytes around
FuncError = HexDec(AX$) !Function error code (decimal)
FileError = HexDec(DX$) !File error code (decimal)

If (FuncError > 32767) FuncError = FuncError-65536 !For unexpected values, convert
If (FileError > 32767) FileError = FileError-65536 !to 2's complement signed integer

If FuncError EQ 1 and FileError EQ 0
Display$='File: '+SourceFile$+' on '+SourceDAB$+' Moved to: '+TPath$
Gosub Display
GOTO EraseSource !Erase the Source File?
ELSE !There was some type of error
GOSUB CopyFileErrors !Get the error detail
Display$='Copy Failed of '+SPath$+' To '+TPath$
Gosub Display
Display$='Copy Failed, Function Error: '+STRIP(STR(FuncError))+'-'+Funcerror$
Gosub Display
Display$='FileError: '+STRIP(STR(FileError))+'-'+FileError$
Gosub Display
wait
ENDIF

GOTO EndOfJob



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]