Easily shop verified, supported, and secure Partner and Alteryx built Add-Ons on Marketplace.
LEARN MOREThis macro uses python and os library to delete any given filepaths.
It is a good way to delete for example the *.bak files.
INPUT of filepaths to be deleted (example):
FilePath |
C:\...\Output.xlsx |
C:\...\SAPExtraction.txt |
C:\...\Report.pdf |
Thanks a lot ! This allows me to delete the .bak files 👍
Would it be possible for you to show how you do the process inside of Alteryx with a screenshot ? I am unable to update to a newer version and therefor cannot use this workflow. Thanks for any help you can provide.
Hi @WorleyT
Download the workflow, and instead of trying to open it, extract it.
Then go to the macro, open it and save it again.
Then come back to the main workflow
Hi Feli
When I try to run the workflow, I'm getting the below error
1-Inside of your python tool, change the kernel for the one available for you
2-restart the kernel
Now I'm getting the permission issue error, what would be the reason any idea
@dineshbabu2811 after saving the macro with the correct kernel, go to the main workflow and be sure to provide valid filepaths to it, and be sure that the user that is running the workflow have the permissions to do it.
Works very well, and simple to set up.
Hey @Felipe_Ribeir0 , I downloaded and followed steps but I must be missing something.
Am I supposed to put file path that I want to target in all inputs in both the MC_Removefiles and Removefiles workflow where it says path and directory?
Hi @sammyb84
You dont need to change anything inside of the macro, just provide the fullpath of the file to be deleted to the macro as input.
Maybe taking a look at these videos can help you to understand how it works:
Hi @Felipe_Ribeir0 ,
I did provide fullpath of the file to be deleted, but which workflow am I inserting it into. I provided screenshots showing where I inserted the full path but it still not working.
Hi Felipe,
I'm trying to use the macro you provided and to delete the file only have no data.
My data sample are:
DistributorCode | ItemCode | ItemDesc | ErrorMessage | ProcessTimestamp |
A# | 1101324002 | NEXU 25KG | Missing Item Code in Table Product Mapping | 6/27/2024 11:42 |
A# | 1101324002 | NEXU 25KG | Missing Item Code in Table Product Mapping | 6/27/2024 11:42 |
DistributorCode,ItemCode,ItemDesc... are my column
if data exist the flow will run to downstream(other tool, file not deleted),
if no data(having column only consider as no data), the file will be deleted:
I adjust the Jupyter notebook:
//// end code
Then, at the filepaths Input)inside REMOVEDFILES. yxmd i put full path to my excel file( path....\excel.xlsx)
So how can i achieve this
excellent thanks. Now that the BAK doesn't self delete half as much as it used to.