Utility - File Management, action Copy
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-06-18 05:37 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-06-18 07:46 PM
The original will be in C:\Program Files (x86)\Blue Prism Limited\Blue Prism Automate\VBO
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-06-18 08:06 PM
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?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-06-18 09:10 PM
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-06-18 03:47 PM
I think you're right Juan! I'll ask to get it changed.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-06-18 08:06 PM
Great! In the meantime I'm performing my own checks to make sure the file exists. Thanks 🙂
