[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Deleting the local file after ftp_put



Wouldn't that be unlink(LocalFile) ?
--
Sean Porterfield


-----Original Message-----
From: Dennis Lovelady
Sent: Sunday, July 24, 2011 09:15
To: 'HTTPAPI and FTPAPI Projects'
Subject: RE: Deleting the local file after ftp_put

Hi, Ernest:

I think you mean:

* Otherwise, assume it's a file, and transfer it.
 c                   else
 c                   if        ftp_put(ftp: wwFile: LocalFile) >= 0
 c                   unlink(wwFile)
 c                   else
 c                   callp     diagmsg(FTP_errorMsg(ftp))    c
endif

As a standard in the application, return values less than zero indicate an error condition.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"A problem well stated is a problem half solved."
        -- Charles F. Kettering

> Hello,
>
> I have downloaded and installed FTPAPI 2.3 and it works. Thanks a lot,
Scott !
>
> Based on the TESTMIROUT sample program, I would like to delete the
> local
file
> (IFS) after transfering it to my Alfresco CMS.
>
> I guess an unlink() should go somewhere here and additional
> instructions
in
> some other places:
>
> ..................
>  * Otherwise, assume it's a file, and transfer it.
>  c                   else
>  c                   if        ftp_put(ftp: wwFile: LocalFile) [<]= 0
>  c                   unlink(wwFile)
>  c                   else
>  c                   callp     diagmsg(FTP_errorMsg(ftp))    c
> endif                                            c                   endif
> c                   enddo
>
>  c                   callp     closedir(dh)
>  c                   return    0
>  P                 E
>
> But I'm not a programmer and I couldn't get it to work...
>
> Thanks in advance for your help.
> Ernest


This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged.  If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited.  Thank you.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------