MoveFile method. Moves file alright, but returns error 424

Advertisement

esjuhn
Joined:
Posts:
3
Location:
Philadelphia

MoveFile method. Moves file alright, but returns error 424

Good morning/evening, wherever you happen to be.

I believe I'm having a problem whose solution is simple, but it belies my utter naivete. Here it is:

The following code (VB in MS Access) raises a runtime error 424, Object Required, however it successfully moves the file.

mySession.MoveFile(strRemoteDir + strFileName, strRemoteDir + "archive/" + strFileName).Check

This code has the same outcome: 424, but a successful move.

Dim moveResult As TransferOperationResult
Set moveResult = mySession.MoveFile(strRemoteDir + strFileName, strRemoteDir + "archive/" + strFileName)

What am I missing? Any assistance will be much appreciated!

Reply with quote

esjuhn
Joined:
Posts:
3
Location:
Philadelphia

Solution from a colleague

Call mySession.MoveFile(strRemoteDir + strFileName, strRemoteDir + "archive/" + strFileName)

Reply with quote

esjuhn
Joined:
Posts:
3
Location:
Philadelphia

Or this works too

mySession.MoveFile strRemoteDir + strFileName, strRemoteDir + "archive/" + strFileName

Reply with quote

Advertisement

You can post new topics in this forum