7 Replies Latest reply on Jan 13, 2021 11:19 AM by Nico Heinze

    Command Generating File List - An oddity

    Tim Brown Seasoned Veteran

      I've been using the really useful method, of having a command file to generate a file list, for source files. Basically setting the following session properties:-

       

      Input Type :- Command
      Command Type :- Command Generating File List
      Command :- <My Command>

       

      My Informatica server is on WIndows , so My Command is a DOS command, something like :-

      @echo off
      dir E:\Data\*.txt /B

       

       

      In the session log I can see this being executed, BUT it fails. It fails because it's changing /B to \B (Unixing it!),

      and hence it's an invalid DOS command.

      I've got round this , by encapsulating the command in a batch (.bat) file, and entering this as my Command property.
      (usefully it also allows me to pass value of parameter $PMSourceFileDir (and only that I think) as a parameter to the batch file).

       

      E:\Data\file_list.bat $PMSourceFileDir

      (so my .bat file being something like
      @echo off
      dir %1\*.txt /B)

      Guess this is probably the best method anyway, but thought I'd share this slight oddity with you (wonder if anyone else has come across this).