cancel
Showing results for 
Search instead for 
Did you mean: 

Utility - File Management, action Copy

JuanMontero1
Level 4
Hello all, it's the first time I'm trying the action "Copy" from this object and it looks to me like it works (Success set to True, empty Message) when the file to be copied does not exist. Does this make any sense? Is it possible I'm looking at a modified object? Would be great if someone could share their code for this action so I can compare. Thanks!
5 REPLIES 5

John__Carter
Staff
Staff
The original will be in C:\Program Files (x86)\Blue Prism Limited\Blue Prism Automate\VBO

JuanMontero1
Level 4
I'll have a look, thanks!. Just to be sure, the idea is that if the file to be copied (or moved, having the same issues with move, weird) does not exist, the action should end with Success set to False and an error message, am I right?

JuanMontero1
Level 4
Ok, so after checking against the original (my version of the object is indeed modified but that's not it) and having a look at the code, is it maybe that's the existance of the file needs to be checked in advance? And then checked again after the copy/move action, I guess. Not a VB expert but I'd say that the objDirectoryInfo.GetFiles(sSourceFileName) will return just nothing (empty list) for a non-existing file, and then the subsquent ""foreach"" will iterate through that empty list, that's do-nothing, ending with Success = True Message = """" Is this explanation correct? I attached a code screenshot to support my view on this. Thanks for the help, Juan Montero.

John__Carter
Staff
Staff
I think you're right Juan! I'll ask to get it changed.

JuanMontero1
Level 4
Great! In the meantime I'm performing my own checks to make sure the file exists. Thanks 🙂