Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > FTP using ASP

Reply
Thread Tools

FTP using ASP

 
 
AP
Guest
Posts: n/a
 
      01-03-2010
Is it possible to use ASP to "FtpPut" or "FtpDelete" a file in an FTP
server ?

For example, in VBA I can do the following to "put" a file to an FTP
server (can something similar be done in ASP - I'm just doing a
feasibility study to see if ASP is the correct platform for me -
thanks):

Public hConnection As Long, hOpen As Long, sOrgPath As String
Public Const INTERNET_OPEN_TYPE_PRECONFIG = 0
Public Const INTERNET_DEFAULT_FTP_PORT = 21
Public Const INTERNET_SERVICE_FTP = 1
Public Const INTERNET_FLAG_PASSIVE = &H8000000
Public Const FTP_TRANSFER_TYPE_UNKNOWN = &H0

'Connect FTP server
strLogon = "xxxxxxx"
strPwd = "xxxxxxx"
hOpen = InternetOpen("Example", INTERNET_OPEN_TYPE_PRECONFIG,
vbNullString, vbNullString, 0)
hConnection = InternetConnect(hOpen, FtpServer,
INTERNET_DEFAULT_FTP_PORT, strLogon, strPwd, INTERNET_SERVICE_FTP, IIf
(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0)
sOrgPath = String(MAX_PATH, 0)
FtpGetCurrentDirectory hConnection, sOrgPath, Len(sOrgPath)

'FTP
subfolder_name = "xxxxxxx"
FtpSetCurrentDirectory hConnection, subfolder_name
FtpPutFile hConnection, "C:\" & f & ".txt", f & ".txt",
FTP_TRANSFER_TYPE_UNKNOWN, 0

 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      01-05-2010
Gazing into my crystal ball I observed AP <(E-Mail Removed)> writing in
news:(E-Mail Removed):

> Is it possible to use ASP to "FtpPut" or "FtpDelete" a file in an FTP
> server ?
>
>


I have used the method mentioned here for quite a while and it works just
fine:

<http://dypso.free.fr/tech/asp-ftp-recuperer-fichier-sans-composant-en.php>
(watch wrapping)

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Net/FTP to download a file (FTP Error 550) Jeff Miller Ruby 0 03-26-2009 05:50 PM
'Undifined commands' on FTP Server, when using FTP 'put' and 'quit' in Client Asaf Sinai Perl Misc 1 07-04-2006 01:02 PM
sun.net.ftp.FtpProtocolException: Error reading FTP pending reply long990802@gmail.com Java 3 12-11-2005 02:46 AM
Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server. D. Buck Perl Misc 2 06-29-2004 02:05 PM
FTP over SSL vs FTP over SSH someone Java 1 04-25-2004 03:30 PM



Advertisments