Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

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
15 - Aurora

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