How to use File Functions in SSIS

Introduction

This article guides you through how to use file functions in SSIS.

Prerequisites

Steps

  1. Drag and drop an SSIS component; in our case, we will use the REST API task.
  2. Open the field where you want to use the function; the format is the file path, then the function name.
  3. Now use the example you want in the field; here are some examples with variables and plain text:

Get file name from full path

Plain Text:

<<c:\desktop\myFileName.txt,FUN_FILE_NAME>>

Variable:

{{User::FilePath,FUN_FILE_NAME}}

File size in bytes

Plain Text:

<<D:\Zappysys\Test\attachmnet.json,FUN_FILE_SIZE>>

Variable:

{{User::FilePath,FUN_FILE_SIZE}}

Conclusion

Following these steps, you can easily use functions for your file paths in SSIS. For further assistance or inquiries, contact our support team via chat on our website or through email at support@zappysys.com.

Reference

Refer to our Format Specifiers / Placeholder Functions article for more detailed information.