Overview
- Moves files between cloud storage locations (S3, GCS, Azure Blob, SFTP, Google Drive, etc.)
- Can rename files during the move
- Can extract ZIP archives and deliver the extracted files to the destination
- Useful for archiving processed files or staging data between pipeline steps
Configuration
1
Select the source connection and path.
2
Select the destination connection and path.
3
Configure file pattern matching (optional — filter which files to move).
4
Choose whether to delete the source file after moving.
5
Optionally, set Compression to None, Compress output to ZIP, or Extract ZIP files.
Delete files from source
When you enable deleting files from the source, File Mover deletes source files as the last step of the move, after every file has been delivered to the destination. If any step fails before that, the job fails and all source files are kept. File Mover deletes only the files it listed at the start of the job:- Files added to the source while the job runs are not moved or deleted. The next run picks them up.
- Before deleting, File Mover checks each file’s size and modification time again. If a file changed during the move, File Mover keeps it at the source and logs
WARNING: <file> changed while it was being moved; kept at the source. - A wildcard matches files only at the level of the source path. For example,
incoming/*.csvmovesincoming/orders.csvbut notincoming/archive/orders.csv.
WARNING: the destination is the source folder, so the files were delivered onto themselves and are kept. This doesn’t apply when you use Compress output to ZIP or Append string to filename. Those deliver files under new names, so the source files are deleted.
Extract mode and Google Drive destinations have their own delete rules. See Extract ZIP files and Google Drive destination.
Extract ZIP files
Use the Extract ZIP files option of the Compression setting when your source delivers ZIP archives and you need the files inside them at the destination. File Mover unpacks each archive that the source path matches and delivers the extracted files with their folder structure intact. The ZIP files themselves are not copied. Extract mode works with the file storage destinations that File Mover supports, including SFTP, Amazon S3, Google Cloud Storage, and Google Drive. Compress output to ZIP is not available for Google Drive destinations. To configure extract mode:1
In the File Mover component, set Compression to Extract ZIP files.
2
Set Extract layout to Separate folder for each ZIP or All files in the destination path.
3
Save the package.
Source path requirements
Every file the source path matches must be a ZIP archive with a.zip extension (case-insensitive). If any matched file is not a ZIP, the job fails and names the file before anything is extracted.
- To match several archives, use a wildcard, for example
incoming/*.zip. - To match every file in a folder, end the path with
/. All files in that folder must be ZIP archives. - If you enter a single file name, it must end in
.zip. Otherwise the package fails validation when you save it.
Extract layout
The Extract layout setting controls where the extracted files go:
For example, with the destination path
exports/ and a source archive orders.zip that contains 2024/jan.csv:
Delete files from source
If you enable deleting files from the source, File Mover deletes the source ZIP files only after every extracted file has been delivered. If extraction or delivery fails, the source archives are kept.Limitations
- You can’t combine extract mode with Append string to filename.
- Each archive can contain at most 50,000 entries and 20 GiB of uncompressed data.
- Encrypted, corrupt, and empty archives fail the job.
- Archives that contain the same path twice fail the job.
- Symbolic links inside archives are removed and not delivered.
- File names that are not valid UTF-8 are refused. This affects some ZIP files created on Windows without the UTF-8 file name flag. Re-create the archive with UTF-8 file names.
- Extracted file names can’t contain colons, except when the destination is Google Drive.
- Existing files at the destination with the same name are overwritten. Point extract mode at an empty or dedicated destination folder, and don’t use the source folder as the destination.
Google Drive Destination
The File Mover can deliver files to a Google Drive folder. Use it to hand off processed files to a Drive folder that a business team owns, without a separate export step.Prerequisites
- A Google Drive connection. Both OAuth (Google Drive) and service account (Google Drive (Service Account)) connections are supported.
- Write access to the target folder. For a service account connection, the folder must live in a Shared Drive and the service account must be a member with Content manager or higher.
Configure the Destination
1
Set the destination connection to your Google Drive or Google Drive (Service Account) connection.
2
Set the destination path to the target Drive folder.
3
If the folder lives in a Shared Drive, set Drive Folder ID (optional) to that Shared Drive folder’s ID.
4
Choose whether to delete source files after a successful upload.
Service Account Requirements
A service account has no personal Drive storage. Uploading to My Drive with a service account returnsstorageQuotaExceeded from Google. To use a service account destination:
- The destination must be a folder inside a Shared Drive.
- The service account must be added to that Shared Drive as Content manager or higher.
- The Drive Folder ID must point at that Shared Drive folder.
Limitations
- Google Drive is supported as a destination only. To read from Google Drive, use the Google Drive source component inside a dataflow.
Use Cases
- Archive raw files to a different S3 bucket after processing
- Move files from an SFTP landing zone to cloud storage
- Rename files with timestamps after a dataflow completes
- Deliver files from SFTP or cloud storage to a Google Drive folder
- Unpack ZIP archives from a vendor SFTP server into S3, GCS, or Google Drive