Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #2412

Re: Cryptic Error Message from CFtp

From "Jamal" <vodotnet_nospam@yahoo.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Cryptic Error Message from CFtp
Date 2011-11-10 09:40 -0500
Organization A noiseless patient Spider
Message-ID <j9gnos$fpa$1@dont-email.me> (permalink)
References <j9e517$641$1@news01.versatel.de> <952f5074-326a-40b1-82bf-01a832ee0b28@n6g2000vbg.googlegroups.com>

Show all headers | View raw


Richard,

Why do you always write 99% of your postings in lower case?
Is it a bad habit or is there no Shift key on your keyboard? <vbg>

It just makes it harder to read!

Jamal


"richard.townsendrose"  wrote in message 
news:952f5074-326a-40b1-82bf-01a832ee0b28@n6g2000vbg.googlegroups.com...

Harry

why dont you make sure that the file exists first ...

here's what we do when tidying up after ftp sessions ... remebering
that this is after the recipient has acknowledge that they have
downloaded all they ought to have done.

richard

ps dont worry about curious method names ...

METHOD GetDelDirs() CLASS FTPSender
LOCAL aDir:={} AS ARRAY
LOCAL cDir:='' AS STRING
LOCAL cLoc:='' AS STRING
LOCAL cStage AS STRING

// clear whats there
SELF:aDelDirs:={}

    BEGIN SEQUENCE

// connect
cStage:='Connecting'
IF SELF:ConnectRemote(SELF:RemoteHost, SELF:UserName, SELF:PassWord)
SELF:lConnected:=TRUE
SELF:Owner:FTPMsg:='Connected'
ELSE
SELF:Owner:FTPMsg:='Failed to connect - ' + SELF:ErrorMsg
SELF:lConnected:=FALSE
BREAK
ENDIF

// get current dir
cStage:='Getting Logon Directory'
cDir:=SELF:getcurDir()
IF Empty(cDir)
SELF:Owner:FTPMsg:='Failed to Get Directory - ' + SELF:ErrorMsg
BREAK
ELSE    // have got base dir
// change to specified location,
cLoc:=SELF:cLocation
aDir:=SELF:Directory()
IF AScan(aDir, {|aItem|Upper(aItem[1]) == Upper(cLoc)}) == 0
SELF:Owner:FTPMsg:='Failed to find upload directory - ' +
SELF:ErrorMsg
BREAK
ENDIF

cStage:='Setting upload Directory'
SELF:SetCurDir(cLoc)

// now get list of dirs
aDir:=SELF:Directory("*." , FA_DIRECTORY )
SELF:Owner:FTPMsg:='Found ' + NTrim(ALen(ADir)) + ' Dirs'
ENDIF

// disconnect
cStage:='Disconnecting Files'
IF SELF:CloseRemote()
SELF:lConnected:=FALSE
ENDIF

    RECOVER

    SELF:CloseRemote()
TextBoxEnh{SELF:Owner,'Info','FTP Error ' + cStage + ', ' +
SELF:ErrorMsg }:Show()

    END SEQUENCE

// SELF:Owner:FTPMsg:=''

RETURN aDir
METHOD RemoveDirs() CLASS FTPSender
LOCAL aKilled:={} AS ARRAY
LOCAL aDir:={} AS ARRAY
LOCAL aFiles:={} AS ARRAY
LOCAL cDir:='' AS STRING
LOCAL cLoc:='' AS STRING
LOCAL cStage AS STRING
LOCAL n,m AS DWORD

BEGIN SEQUENCE

// connect
cStage:='Connecting'
IF SELF:ConnectRemote(SELF:RemoteHost, SELF:UserName, SELF:PassWord)
SELF:lConnected:=TRUE
SELF:Owner:FTPMsg:='Connected'
ELSE
SELF:Owner:FTPMsg:='Failed to connect - ' + SELF:ErrorMsg
SELF:lConnected:=FALSE
BREAK
ENDIF

// get current dir
cStage:='Getting Logon Directory'
cDir:=SELF:getcurDir()
IF Empty(cDir)
SELF:Owner:FTPMsg:='Failed to Get Directory - ' + SELF:ErrorMsg
BREAK
ELSE    // have got base dir
// change to specified location, if ! exist, create it
cLoc:=SELF:cLocation
aDir:=SELF:Directory()
IF AScan(aDir, {|aItem|Upper(aItem[1]) == Upper(cLoc)}) == 0
SELF:Owner:FTPMsg:='Failed to find upload directory - ' +
SELF:ErrorMsg
BREAK
ENDIF

cStage:='Changing to upload Directory'
SELF:SetCurDir(cLoc)

// now get list of dirs and check if for removal
aDir:=SELF:Directory()
FOR n:=1 TO ALen(SELF:aDelDirs)
cDir:=SELF:aDelDirs[n]
IF AScan(aDir, {|ax|AllTrim(ax[F_NAME]) == cDir}) > 0
// change to dir
cStage:='Changing to Transmittal Directory'
SELF:SetCurDir(cDir)
// remove files
cStage:='Removing Transmittal Files'
aFiles:=SELF:Directory()
FOR m:= 1 TO ALen(aFiles)
IF ! SELF:DeleteFile(aFiles[m, F_NAME])
BREAK
ENDIF
NEXT
// change back up
SELF:SetCurDir("..")
// remove dir
cStage:='Removing Transmittal Directory'
IF SELF:RemoveDir(cDir)
AAdd(aKilled, cDir)
ELSE
BREAK
ENDIF

ENDIF
NEXT
ENDIF

// disconnect
cStage:='Disconnecting Files'
IF SELF:CloseRemote()
SELF:lConnected:=FALSE
ENDIF

    RECOVER

    SELF:CloseRemote()
TextBoxEnh{SELF:Owner,'Info','FTP Error ' + cStage + ', ' +
SELF:ErrorMsg }:Show()

    END SEQUENCE

SELF:Owner:FTPMsg:=''

RETURN aKilled



Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cryptic Error Message from CFtp "Harry B." <bongoplayer@gmail.com> - 2011-11-09 16:08 +0100
  Re: Cryptic Error Message from CFtp "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-11-10 02:12 -0800
    Re: Cryptic Error Message from CFtp "Jamal" <vodotnet_nospam@yahoo.com> - 2011-11-10 09:40 -0500
      Re: Cryptic Error Message from CFtp "Francesco F." <francescangeli.f@tiscali.it> - 2011-11-09 17:52 +0100
        Re: Cryptic Error Message from CFtp "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-11-10 08:03 -0800
    Re: Cryptic Error Message from CFtp "Harry B." <bongoplayer@gmail.com> - 2011-11-10 18:00 +0100
  Re: Cryptic Error Message from CFtp "Karl-Heinz" <invalid@invalid.invalid> - 2011-11-10 18:40 +0100
    Re: Cryptic Error Message from CFtp "Willie Moore" <williem@wmconsulting.com> - 2011-11-10 12:33 -0600
    Re: Cryptic Error Message from CFtp "Harry B." <bongoplayer@gmail.com> - 2011-11-12 09:09 +0100

csiph-web