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?