File Management
Lido provides action formulas for managing files in connected cloud storage services (Google Drive, OneDrive, SFTP/FTP, etc.).
COPYFILE
Copies or moves a file from one cloud storage location to another.
Syntax:
=COPYFILE(source, destination)
=COPYFILE(source, destination, output_cell, delete_original, new_name)
Parameters:
| Parameter | Description | Required |
|---|---|---|
source | The URL or identifier of the source file (Google Drive, OneDrive, etc.) | Yes |
destination | The target folder URL or path | Yes |
output_cell | A cell reference where the result URL will be written | No |
delete_original | If true, deletes the source file after copying (effectively a move) | No |
new_name | A new filename for the copied file | No |
RENAMEFILE
Renames a file in cloud storage.
Syntax:
=RENAMEFILE(file, new_name)
=RENAMEFILE(file, new_name, output_cell)
Parameters:
| Parameter | Description | Required |
|---|---|---|
file | URL or identifier of the file | Yes |
new_name | New filename | Yes |
output_cell | Cell reference to write the result URL | No |
DELETEFILE
Deletes a file from cloud storage.
Syntax:
=DELETEFILE(file)
=DELETEFILE(file, status_cell)
Parameters:
| Parameter | Description | Required |
|---|---|---|
file | URL or identifier of the file to delete | Yes |
status_cell | Cell reference to write status | No |
CREATESTORAGEFOLDER
Creates a new folder in cloud storage.
Syntax:
=CREATESTORAGEFOLDER(folder_name, storage)
=CREATESTORAGEFOLDER(folder_name, storage, status_ref)
Parameters:
| Parameter | Description | Required |
|---|---|---|
folder_name | Name for the new folder | Yes |
storage | Storage service identifier | Yes |
status_ref | Cell reference to write status | No |
FTPFILE
Resolves a file on an SFTP/FTP server into a file reference that other formulas can consume.
Syntax:
=FTPFILE(ftp_credential, path)
Parameters:
| Parameter | Description | Required |
|---|---|---|
ftp_credential | A Lido credential associated with SFTP/FTP | Yes |
path | The absolute path of the file to resolve | Yes |
Example:
=FTPFILE(<ftp-credential>, "/uploads/report.csv")
FTPUPLOAD
Creates a destination on an SFTP/FTP server that file-producing formulas (such as COPYFILE) can upload to.
Syntax:
=FTPUPLOAD(ftp_credential, [folder])
Parameters:
| Parameter | Description | Required |
|---|---|---|
ftp_credential | A Lido credential associated with SFTP/FTP | Yes |
folder | Remote folder path. Defaults to the connection's home directory | No |
Example:
=FTPUPLOAD(<ftp_credential>, "/uploads")