Comments on: Informatica: Dynamic Source File Name https://blogs.perficient.com/2013/04/23/informatica-dynamic-source-file-name/ Expert Digital Insights Tue, 09 Jun 2020 20:28:37 +0000 hourly 1 By: linda.lin https://blogs.perficient.com/2013/04/23/informatica-dynamic-source-file-name/#comment-2884 Fri, 10 Oct 2014 02:21:46 +0000 http://blogs.perficient.com/delivery/?p=2183#comment-2884 I found an alternative Informatica offical website: It uses a wildcard in the name of a source file in a PowerCenter session, use the Command option:
In the Workflow Manager, edit the session task and go to the Mappings tab.
Select the Flat File Source Definition and click the Properties tab.
Set the Input type as “Command” and the Command type as “Command generating File list”.
In the Command option, enter the command to list the files.
The Command used depends on the operating system.

Windows
On Windows, due to a known issue, the command will need to be added to a batch file.

Example
The following commands can be added to a batch file to list the files in “bare” mode:
@echo off
cd C:\Informatica\PowerCenter8.6.1\server\infa_shared\SrcFiles
dir /b file_name*.txt
In this case the batch file is called file_list_test.bat.
The following would be added to the command option:
$PMSourceFileDir\file_list_test.bat

UNIX
On UNIX, use the ls command in the Command option.

Example
ls $PMSourceFileDir/file_name*
These commands generate a file list from the source file directory of all files that start with the same name.
When the session runs, the flat file reader reads each file as it reads the file names from the command.

]]>