About EasyMorph Tutorials & Examples Web-help

Move multiple files

Hi Dimitry

I have a project where I fetch data from and email folder, extract it and unzip it. I then rename a list of files using File Command. (Great future!). The next step is now, to move the files from the temp folder to the correct folders.

image

I looked at file command move/copy list of files, but it does not work for me as destination folder is based on parameter and Supplier field.

I also had a look at the Make Copy of Files and Save Copies at a designated Location post

‘copy /y "’ & [File name with full path] & ‘" "’ & {Target folder} & ‘"’

I was hoping I could adapt the code to read:

‘copy /y "’ & [File name with full path] & ‘" "’ & {Target folder} & “” & [Supplier] & ‘"’

but it did not work for me either.

{Target folder} = C:\Users\rykie\Dropbox\Rykie Share\Data\Masterfiles\
And based on Supplier it should go to their folder
C:\Users\rykie\Dropbox\Rykie Share\Data\Masterfiles\ Abc

Just another note: In Rename list of files, I could pick up the New names from a field, but on copy/move list of files, the destination cannot refer to a field name.

Any suggestions?
Thanks
Rykie

How about using iterations where you pass the path of the file to move and the destination folder to an iterated submodule which then uses the “File command” action to move a single file? Even if you have hundreds of files to move it should work reasonably fast.

Thanks, Dmitry. I applied your solution and it works fine.

R

To learn more about EasyMorph visit easymorph.com.