
Description
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Notify Moderator
This Macro has multiple actions with the purpose of moving or copying assets (files or folders) to a new location. In addition to an assortment of different actions for moving files, folders, or their contents, there is also a selection for an override policy. This should be used to decide whether the Source Asset replaces an Asset of the same name in the Destination Location. Polices that can be used are:
- Always
- If there is an asset with the same name in the Destination Location, the Source Asset will always be copied or moved. This will replace the original file in that location.
- Newer
- If there is an asset with the same name in the Destination Location, the Source Asset will be only be copied or moved if it is newer than the original asset.
- Older
- If there is an asset with the same name in the Destination Location, the Source Asset will be only be copied or moved if it is older than the original asset.
- Smaller
- If there is an asset with the same name in the Destination Location, the Source Asset will be only be copied or moved if it is smaller than the original asset.
- Larger
- If there is an asset with the same name in the Destination Location, the Source Asset will be only be copied or moved if it is larger than the original asset.
- Never
- If there is an asset with the same name in the Destination Location, the Source Asset will never be copied or moved.
Actions that can be used are:
- Create Folder
- Creates an empty folder in the Destination Location.
- List Folder Contents
- Finds all Files and Folders in a Source Location.
- This differs from the Directory Tool that only finds Files in a directory.
- Finds all Files and Folders in a Source Location.
- Copy
- Copies an individual Asset from the Source Location to the Destination Location.
- Only a single Asset can be copied at a time.
- The Asset can be a file or a folder.
- If the Asset is a folder, the folder and all of the folder contents will be copied.
- If the Asset is a file, you must include the file name and extension in both the Source Location and the Destination Location.
- If the Destination Location Asset name is different than the Source Location Asset name, the newly copied Asset will use the new name.
- Copies an individual Asset from the Source Location to the Destination Location.
- Copy Contents
- Copies all files from the Source Location to the Destination Location.
- The Source Location and Destination Location must both be existing folders.
- Only files will be copied.
- Folders contained inside the Source Location will be skipped.
- All files copied over will retain their current name.
- Copies all files from the Source Location to the Destination Location.
- Move
- Moves an individual Asset from the Source Location to the Destination Location.
- The Asset can be a file or a folder.
- If the Asset is a folder, the folder and all of the folder contents will be moved.
- If the Asset is a file, you must include the file name and extension in both the Source Location and the Destination Location.
- If the Destination Location Asset name is different than the Source Location Asset name, the newly moved Asset will use the new name.
- The Asset can be a file or a folder.
- Moves an individual Asset from the Source Location to the Destination Location.
- Move Contents
- Moves all files from the Source Location to the Destination Location.
- Only files will be moved.
- Folders contained inside the Source Location will be skipped.
- All files moved over will retain their current name.
- The Source Location and Destination Location must both be existing folders.
- Only files will be moved.
- Moves all files from the Source Location to the Destination Location.
- Delete
- Deletes an individual Asset from the Source Location.
- The Asset can be a file or a folder.
- If the Asset is a folder, the folder and all of the folder contents will be deleted.
- If the Asset is a file, you must include the file name and extension in Source Location.
- The Override Policy 'Always' is required.
- All deletions are final and irreversible.
- The Asset can be a file or a folder.
- Deletes an individual Asset from the Source Location.
- Delete Contents
- Deletes all files from the Source Location folder.
- Only files will be deleted.
- Folders contained inside the Source Location will be skipped.
- The Source Location be an existing folder.
- The Override Policy 'Always' is required.
- All deletions are final and irreversible.
- Only files will be deleted.
- Deletes all files from the Source Location folder.
- Zip a Folder
- Zips a folder in the Source Location to the Destination Location.
- Outputs a folder into a .zip file.
- Zips a folder in the Source Location to the Destination Location.
- Unzip a Folder
- Unzips an archive in the Source Location to the Destination Location.
- Unzips the following file types:
.gz
.zip
.yxzp
- .docx
- Unzips the following file types:
- Unzips an archive in the Source Location to the Destination Location.
This Macro will only work for Alteryx version 2021.1.4 or higher. This macro was saved on 2023.2.1. For the best experience, use this version or higher!
Disclaimer:
Download includes both the Macro and a Demo Workflow for how to use the Macro. The Demo Workflow is not required to use this Macro.
Files and Folders are moved using Python and the SHUTIL package. This package should be included by default in your Alteryx Environment.
If there is a file/folder that already exists in the new location with the same name this tool WILL replace it. Please ensure that the location that you are using for the Destination Location is either empty or intentionally being replaced by the file/folder located at Source Location.
This tool is not endorsed by Alteryx Inc. and will not be supported by Alteryx Support or any member of Alteryx Staff. Alteryx Inc. is not responsible for the results of using this Macro. Please test this tool prior to using it with any file(s) or folder(s) that are important. Please ensure you have backups of any data prior to using this tool to move them.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Notify Moderator
Super useful for mitigating issues with servers reading in files