Errror trying to upload file using vb.net Code

Advertisement

Swindellvc@cofc.edu
Joined:
Posts:
12
Location:
Charleston, SC

Errror trying to upload file using vb.net Code

I'm trying to upload a file and I'm getting

Error:Cannot overwrite remote file '/studentlists'.$$ <which is the directory on the upload and is empty when testing code
Press 'Delete' to delete the file and create a new one instead of overiting it. $$



I'm using the VBA code...
is there a way to overwite an existing file?
or sync a single file using VB?



blah blah blah for SessionOptions

mySession.Open(mySessionOptions)

' Upload files
Dim myTransferOptions As New TransferOptions
myTransferOptions.TransferMode = TransferMode.Binary

Dim transferResult As TransferOperationResult
transferResult = mySession.PutFiles("\\aiken\ProdCognos\ITExtracts\studentlist.csv", "\studentlists", False, myTransferOptions)

' Throw on any error
transferResult.Check()

' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
MsgBox("Upload of " & transfer.FileName & " succeeded")
Next

Reply with quote E-mail

Advertisement

Advertisement

You can post new topics in this forum