We cannot set the From' file path dynamically to BULK INSERT .
Dynamically generated path
set @sentFile = @StrImportFolder + N'etl_rnli_sent_'+ @loadDate + N'.txt'
Here, @loadDate is the component variable of the file name.
The above work example uses a fixed path event with a variable:
SET @filepath = N'e:\5-digit Commercial.csv',
Here the variable has a correction path for each case.
So, try using the path to the file definition.
source share