By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,156 Members | 1,009 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,156 IT Pros & Developers. It's quick & easy.

FtpRenameFile Problems

P: n/a
I am having problems solving an ftp issue. I uploaded user selected files
into a specific directory. Then I open the file in my vb.net app, and open a
data table. The information is then inputted into the data table. At that
point, the user selects upload, and the data table is posted to the remote
database, and the record modified is retrieved. At this point, I am
attempting to rename the uploaded file to the record modified row number.
This process works until I rename the file on the remote server. I have
passed variables through this function, and I have tried specific names that
I’m sure it would recognize. Below is the variables passed and the code I
used for FtpRenameFile:
Public Declare Function FtpRenameFile Lib "wininet.dll" Alias
"FtpRenameFileA" (ByVal hFtpSession As Long, ByVal OldName As String, ByVal
NewName As String) As Boolean
'hConnection is my session string that has been tested and works on other
wininet functions
OldName = "1.pdf" & vbNullChar
NewName = "1234.pdf" & vbNullChar

MsgBox(FtpRenameFile(hConnection, OldName, NewName))

Every which way I run this, it always returns false. Anyone have any Ideas?
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.