Page 1 of 1

Copy/Move files without directory structure

Posted: Mon Jun 29, 2015 8:29 am
by jwawrzon
I am trying to set up a monitor that will copy any new files with a specific file name over to an archive directory. The monitor seems to work fine, but when it copies the newly created files to the archive, it also copies the entire directory structure as well. Is there a way to just copy the files over?

Eg:
C:\stuff\things\morethings\file.pdf

Copies over to

X:\Archive\stuff\things\morethings\file.pdf

i want it to be

X:\archive\file.pdf

Thanks.

Re: Copy/Move files without directory structure

Posted: Mon Jun 29, 2015 8:42 am
by Support_Rick
jwawrzon,

On the COPY task under the "Advanced" tab, there's an option to "Flatten Destination Directory".

This should do what you're looking for.

Re: Copy/Move files without directory structure

Posted: Mon Jun 29, 2015 8:53 am
by jwawrzon
Sorry I should have mentioned this is for an sftp session. I do not have a copy option unfortunately. In the manual it says there should be a flatten option with move as well but it is not there.

Re: Copy/Move files without directory structure

Posted: Mon Jun 29, 2015 9:00 am
by Support_Rick
The only option you have is to create a WorkSpace. Do the SFTP | Get and bring the files back to your WorkSpace as a destination. Then, use the Copy Task destination filelist variable as the Source Variable for the Copy to Final Destination with the Advanced option to Flatten.

Delete the Workspace when done.

Re: Copy/Move files without directory structure

Posted: Mon Jun 29, 2015 9:20 am
by jwawrzon
That worked perfectly. Thanks!