I am moving files from source folder to destination folder using “ for each file in folder” “ move file” with overwrite option.
But since the destination folder is a network drive. So moving each file gets slow. Also I don’t know why - but occasionally a few files are getting missed with looping. Can you suggest a way to speed this up and accurate?
Thanks a lot
Could you just move the whole folder?
@sarathi125 suggested, Directory.Move method moves a directory and all its contents, including nested subdirectories and their files, to a new location and if the destination directory already exists, an error occurs.
You cannot use assign activity because return type of this method is none.
You can write this code in invoke method activity with the following options:
Target Type as System.IO.Directory
Method Name as Move
Two parameters in property panel with In and String Type for Source…
you can follow this vedio
it will help you
Just look over on this thread
I have downloaded two sheets i.e,
I need to move the files to another folder. The problem here is, whenever I download the file, the name of the downloaded file will be changed. So I need to change the files with respect to names. How can I move the files?
Someone help me in solving this.
You need to ensure that when using move file/copy file / delete file that you perform pre and post checks.
You can use Path Exists (file) activity and provide the full file path. Use this Boolean with retry scope and if the file path does not exists then the move file is tried again.
Do the same post move to confirm if the file was moved.
This is one way of interacting with network drives.
Hope this helps.