cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to copy around 1000 files from one folder to another

Miya
Level 5
Hi,
  I am trying to copy around 1000 files from 1 folder to another, when i use get file action and adding it to collection due to large number of files, i am having issue. Please can some one suggest me how to split this 1000 files into 2 or 3 sets and get it in collection.

Thanks & Regards,
Arthi

------------------------------
Arthi Raju
------------------------------
6 REPLIES 6

EmersonF
MVP

Could you post more details of the error?

One solution would be to use get files to get the 1,000 files and use the action move file within a loop.

Another solution would be for you to use a VBO to copy the entire folder at once, I'll leave it attached. I hope it helps you ..
JSFiddle - Code Playground
Save as xml and import in your Blue Prism
If this was useful to you, please mark it as useful.










------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
------------------------------
Sr Cons at Avanade Brazil

Hi Emerson,

  Thank You for the quick reply, the issue is, can i able to load the 1000 to 1500 files together into the collection , my understanding is collection storage will be a issue when i load this much bulk files.
Is it possible to copy in sets of 200 using the get files option, pls can you share the expression to copy first 200 files from one folder to another and also can you share the code to loop the next sets of files.


Thanks & Regards,
Raju

------------------------------
Raju
------------------------------

Hi, 

do you really "need" those files in excel? what you use them after file copy?

If you need just to copy files:

use Utility - File Management::Copy File
File path: "c:\temp\1\*.*"               
Destination: "c:\temp\2\"              

- *.* means all files from that folder
- folder c:\temp\2:
---  must exist (you can check with the Utility - File Management::Directory Exists)
---  do not forget the leading "\" otherwise all files will be copied into one file instead of folder)



------------------------------
Mindaugas Breskus
Software engineer
Swedbank
Europe/Vilnius
------------------------------

I understand your problem, with the VBO I attached you will not need to load these files into a collection,
if your object is just moving? you can copy the entire folder at once.

In case you want to read the files you can read them pre-fixed with Get files, in the input pattern you can use "1 *"
it will recover all files that start with digit 1, and so on.


If it is not necessary to read, the copy directory VBO will serve you well

------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
------------------------------
Sr Cons at Avanade Brazil

vinodchinthakin
Level 9
HI Raju,

You can use below asset which has the activity to Copy and Move a Folder from one place to another. I have checked and it worked for me. https://digitalexchange.blueprism.com/dx/entry/113833/solution/atcs---utility-file-management

------------------------------
vinod chinthakindi
------------------------------

Thank You, Yes it worked i copied the files.

regards,
Arthi

------------------------------
Raju
------------------------------