How to move specific files to destination

How to move the source (files) in the destination folder

Source - these are specific files(with pptx,pdf…)
Destination - specific folder only depending on the path in the Column E

By using Move files activity

Hello @nv08
I am moving these files according to the excel file.
Can you please elaborate if how do i use the move activity?

There are a lot of files that needs to be transfered in a spcific folder depending on the Column E

First bring the excel file in data table using excel scope application
Iterate the data table by for each row activity
In move file activity
Src:- path of file to be moved (row("src).to string)
Destination path- path where to be moved (row(“dest”).to string)

Note the path should be full path along with file name and it’s extension in both src and dest path

what if in the dest path, it is only a folder?

Source - file
Dest - Folder

Folder with file name and extension same as the src file name and extension

Then if dest is a folder then in destination part of move file activitiy u can put like this

row(“Destination”).ToString+""+Path.GetFileName(row(“Source”).ToString)

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Hello @NIVED_NAMBIAR!

Thank you!

But may I ask if what if my Source is not just a file name. But a file path as well.

Like

D:\UNICHAN\GEO_AUTOSORT\Data\Delaware\Testttt\Additur-Disposal-Services.pdf

row(“Destination”).ToString+" "+Path.GetFileName(row(“Source”).ToString)

Will retrive the filename from the path itself with extension

Hello @NIVED_NAMBIAR

May I ask if what is wrong in this script

instead of “” put"\"

Hi @NIVED_NAMBIAR

its still not working :frowning:

image

Can u show local panel please?

Your data table is not having any values. It’s null

hello @nv08
i have a data in my excel file :frowning:

Hi @prititit

Please check the datatable it is seen as null

Please check the scope of dt1 varaible on varaible panel too

Hello @NIVED_NAMBIAR

Omg!! Thank you so mucccch Nived! Its now working!

1 Like