In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

File Copy and Move tool

Kinetic_analytics
11 - Bolide

Hello:

Dear great people. Is there any Alteryx tool for copying files and posting into a folder in at Alteryx workflow?

Thanks

6 REPLIES 6
JosephSerpis
17 - Castor
17 - Castor

Hi @Kinetic_analytics you can use the Run Command tool or use a combination of Blob Input and Blob Output tools for this challenge.

Kinetic_analytics
11 - Bolide

Thanks. Do you have any example for me to tackle the situation?

amirsemsar
8 - Asteroid

You can use python both to MOVE and COPY simply replace copy with move.

 

from ayx import Alteryx
import shutil
import os
import pandas as pd


def archiving(a):
    source=a['filepath'].tolist()
    destination=a['destination'].iloc[0]
    destination=destination.replace('\\','/')
    source=[shutil.copy(each,destination) for each in source]
    dicty={"newfiles":[destination+os.path.basename(each) for each in source]}
    output=pd.DataFrame.from_dict(dicty)
    Alteryx.write(output,1)

df=Alteryx.read("#1")
archiving(df)
ChrisTX
16 - Nebula
16 - Nebula

Here's a related Idea, that could benefit from a few more Likes:

 

File Management tools (copy, rename, delete)

https://community.alteryx.com/t5/Alteryx-Designer-Ideas/File-Management-tools-copy-rename-delete/idi...

 

Kinetic_analytics
11 - Bolide

Thank you @amirsemsar 

Labels
Top Solution Authors