SSIS and Secured FTP Commands to GET a Remote File using wildcards

So my biggest caveat here is dealing with wildcards! For the life of me I cannot find any good examples of SSIS and scripting that uses FTP wildcards to GET certain Files. In a nutshell, here's what I need to do...
Query a SQL Server Database which has a parsed File Name, the first 50 characters of the file name.
The Query "Result Set" is put into an Object Variable User::SQLServerFileList
I then utilize a "Foreach Loop Container" which reads the User::SQLServerFileList and puts it into Variable User::SQLServerFileNm...which is again the first 50 characters of the File Name
Within the "Foreach Loop Container", I then utilize an "Expression Task" which builds a variable User::RemoteFileLookup which is a concatenation of the User::RemoteFolderPath + User::SQLServerFileNm + the wildcard *(Variable
User::RemoteWildCard)
I then try and utilize a "FTP Task" to use that concatenated Variable to go and GET the Filename but every time I try, it does not like what I'm sending via the "FTP Task"
Error: 0x0 at TF Secure FTP Task, ExecuteTask Failed:: Illegal characters in path.
I realize I might have to do something like this via C#.
My biggest challenge is providing the GET Command via the Remote FTP Site with a parsed Filename and utilizing a wildcard.
mc7i1231_20140227_050114_27_05_02_09*.999
And the Filename that exists on the FTP Server is...
mc7i1231_20140227_050114_27_05_02_09_x12_a43419452ca844a9b8a00f61e655dca3.x12-20140303180032.999
Can any gurus out there PLEASE help me out???
Thanks in advance for your review and am hopeful for a reply.
PSULionRP

Hi PSULionRP,
According to the document
FTP Task, we can read that:
The FTP task supports the ? and * wildcard characters in paths. This lets the task access multiple files. However, you can use wildcard characters only in the part of the path that specifies the file name. For example, C:\MyDirectory\*.txt is a valid
path, but C:\*\MyText.txt is not.
So, when you use expression tobuild the variable RemoteFolderPath, make sure the evaluated value of the expression conforms to the above rule. 
Regards,
Mike Yin
TechNet Community Support

Similar Messages

  • How can we a validate a CSV file in SSIS and log the error details in another CSV File by using Sript Task.

    How can we a  validate a CSV file in SSIS and log the error details in another CSV File by using Sript Task.

    Please see:
    http://www.bidn.com/blogs/DevinKnight/ssis/76/does-file-exist-check-in-ssis
    http://social.msdn.microsoft.com/Forums/en-US/01ce7e4b-5a33-454b-8056-d48341da5eb2/vb-script-to-write-variables-to-text-file

  • I have a JVC GY-HM100U and when I try to get the video files (MP4 format) off of the the SD card I get the error message OSStatus error -12909...any thoughts?

    I have a JVC GY-HM100U and when I try to get the video files (MP4 format) off of the the SD card I get the error message OSStatus error -12909...any thoughts?

    To be more precise: You MUST shoot in mov. Then drag the Clip bins from the card to you hard drive. Then drag the clips to FCP timeline and FCP asks you if you want to change to the right codec and of course you say YES. Now you can start editing. Can not be more simple. This camera was specially designed for use with FCP.

  • I was using ios 7.0.3 nd it was working very nice but before some days i got an update 7.0.4 nd i updated and now my iphone is getting switch off while using nd restarts..???? what to do

    i was using ios 7.0.3 nd it was working very nice but before some days i got an update 7.0.4 nd i updated and now my iphone is getting switch off while using nd restarts..???? what to do

    Sorry you cannot go back to previous version once your are updated to the latest iOS version.
    Apple prevents downgrading your phone.

  • How to search for files using wildcards * and ?.

    Hi All,
    I've been searching the forum for a couple of hours now and have been unable to find a good example of how to search a directory (Windows OS) for a file using wildcards * and/or ?. Does anyone out there have a good example that they can share with me?
    Thanks

    Hi All,
    First of all I want to thank everyone for taking the time to respond to my question. All of your responses where greatly appreciated.
    I took the example code that was posted by rkconner, thanks rkconner, and modified it to allow me to search for files in a directory that contain * and/or ?. Yes, I said and/or! Meaning that you can use them both in the same file name, example: r??d*.t* would find readme.txt.
    I've posed my complete and thoroughly document code below. I hope it is very helpful to other as I have searched many forums and spent many hours today trying to resolve this problem.
    Enjoy
    * File Name: WildcardSearch.java
    * Date: Jan 9, 2004
    * This class will search all files in a directory using the
    * asterisk (*) and/or question mark (?) as wildcards which may be
    * used together in the same file name.  A File [] is returned containing
    * an array of all files found that match the wildcard specifications.
    * Command line example:
    * c:\>java WildcardSearch c:\windows s??t*.ini
    * New sWild: s.{1}.{1}t.*.ini
    * system.ini
    * Command line break down: Java Program = java WildcardSearch
    *                          Search Directory (arg[0]) = C:\Windows
    *                          Files To Search (arg[1]) = s??t*.ini
    * Note:  Some commands will not work from the command line for arg[1]
    *        such as *.*, however, this will work if you if it is passed
    *        within Java (hard coded)
    * @author kmportner
    import java.io.File;
    import java.io.FilenameFilter;
    public class WildcardSearch
         private static String sWild = "";
          * @param args - arg[0] = directory to search, arg[1] = wildcard name
         public static void main(String[] args)
              String sExtDir = args[0]; // directory to search
              sWild = args[1];   // wild card to use - example: s??t*.ini
              sWild = replaceWildcards(sWild);
              System.out.println("New sWild: " + sWild);
              File fileDir = new File(sExtDir);
              File[] arrFile = fileDir.listFiles(new FilenameFilter()
                   public boolean accept(File dir, String name)
                        return (name.toLowerCase().matches(sWild));
              for (int i = 0; i < arrFile.length; ++i)
                   System.out.println(arrFile.getName());
         }     // end main
         * Checks for * and ? in the wildcard variable and replaces them correct
         * pattern characters.
         * @param wild - Wildcard name containing * and ?
         * @return - String containing modified wildcard name
         private static String replaceWildcards(String wild)
              StringBuffer buffer = new StringBuffer();
              char [] chars = wild.toCharArray();
              for (int i = 0; i < chars.length; ++i)
                   if (chars[i] == '*')
                        buffer.append(".*");
                   else if (chars[i] == '?')
                        buffer.append(".{1}");
                   else
                        buffer.append(chars[i]);
              return buffer.toString();
         }     // end replaceWildcards method
    }     // end class

  • HT5622 When I sign in with my apple ID and password then goto password and security, i do not get the option to reset my security information. Why not?

    I do not have the option to change my security information when I sign in to my Apple ID and goto Password and security. Why not?

    Just to be clear - what are you signing into?  You could be talking about connecting or setting a computer or device to your icloud or itunes account.  You could be talking about logging into your icloud account using a browser to icloud.com.  Or you may have followed a link to an Apple page that lets you edit your account.
    If you can't remember your security questions/answers then go to Express Lane  and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Security' and fill in that you'd like your security questions/answers reset.
    You should get an email reply within about 24 hours (and check your Spam folder as well as your Inbox) - but some recent posts are saying that Apple have temporarily suspended the reseting of security question/answers whilst account security processes are improved, so it may take longer.

  • Getting remote file using FTP Server Issue in OSB

    Hi Guys,
    I have configured a FTP server on my local system and I created a proxy service to get file from ftp location to some other location but it fails . I used ftp protocol for getting file
    and my ftp location is D:\host\ftp and it has another folder called osb . I used ftp as protocol and EndPointURI is ftp://localhost/. It fails to get files and shows error message like
    com.bea.wli.sb.transports.TransportException: <user:osb>Unable to list files for
    directory: .
    at com.bea.wli.sb.transports.ftp.connector.FTPWorkPartitioningAgent.exec
    ute(FTPWorkPartitioningAgent.java:218)
    In case of Business Service, writing a file to ftp location (i.e ftp://localhost/ means D:\host\ftp\osb) working.
    I used service account for both proxy,BS to connect . osb is username and same as password.
    Can Any one please suggest me How to solve this issue?
    Thanks,
    Srinivas.
    Edited by: 863597 on May 22, 2012 1:06 AM

    Hi Vijay Thank you,
    Can we do the pooling directly using FTP protocol like JMS protocol in OSB with out using FTP JCA Adapter.I did in such a way but it fails. For pooling files the mentioned endpoint uri is as ftp://localhost/ and it actual path is D:\host\ftp and ftp has another folder called osb here i have to get the files from this osb Can any one suggest me if there is any problem with the ftp protocol end point.
    Thank You,
    Srinivas.

  • Data Integrator has no read permissions to get the data file using FTP

    Hi,
    I wonder if you could help.
    We have installed the data integrator and are using FTP to get the data file from the SAP server to the DI server. The files are created by the SAP admin user with permissions 660. The FTP user is not in the sapsys group so cannot read the files.
    Has anyone come accross this problem and how did you solve it?
    Many thanks.

    Hi,
    you might want to put you entry into the EIM forum where also the Data Integrator topics are being handled:
    Data Services and Data Quality
    Ingo

  • Looping multiple excel files at a time in ssis and create a new column to insert the files names

    Hi Friend,
    i have one requirement.
    I got around 200 excel files with date as file name like 120101.xls, 120102.xls (YYMMDD).
    I am able to loop all the files and insert data but i am unable to load the files names using ssis.
    Please can any one help to fix this using script task or any other code..
    It is very urgent

    Thank You Vaibhav,
    I want to insert the file name along with the other columns of data from excel.
    like this deriving a new column FILE_NAME
    Your ForEach Loop task must be returning the entire file path, I suppose.
    1. Get the file name from your file path. 
    New variable: FileName 
    Expression   : RIGHT(@[User::FilePath],FINDSTRING(REVERSE(@[User::FilePath]),"\\",1)-1)
    2. Inside Data flow, after Excel source use Dervied Column and use above @FileName
    3. At your OLEDB destinition, use MyFileName.
    -Vaibhav Chaudhari

  • Getting empty csv file using servlet

    Hi
    i am working on reports for my web application and i used struts frame work.
    for my reports i want csv export, so for that i written servlet, once if i click generate button i am able to open popup window to save the generated csv file at my local system, but i am getting emplty csv file..
    nothing si ther ein that file forget abt data atleast my header fields.
    here is my servlet file..plz let me know where i am doing wrong..
    public class ReportServlet extends HttpServlet{
         public void doPost(HttpServletRequest req,HttpServletResponse res)
    throws ServletException,IOException
    PrintWriter out = res.getWriter();
    res.setContentType("text/csv");
    res.setHeader("Content-Disposition","attachment; filename=\"export.csv\"");
    out = res.getWriter();
    AdvDetailReportBean reportBean = null;
    ArrayList list =(ArrayList)req.getSession().getAttribute("advreportlist");
    System.out.println(" servlet report list size is"+list.size());
    String branchcode=(String)req.getSession().getAttribute("branchcode");
              String bName=(String)req.getSession().getAttribute("branchname");
              System.out.println(" servlet branch name"+bName);
              System.out.println(" servlet branch code"+branchcode);
    StringBuffer fw = new StringBuffer();
              fw.append("Branch Code");
              fw.append(',');
              fw.append("Branch Name");
              fw.append('\n');
              fw.append(branchcode);
              fw.append(',');
              fw.append(bName);
              fw.append('\n');                              
              fw.append('\n');
              fw.append("Customer Name");
         fw.append(',');
         fw.append("Constitution Code");
         fw.append(',');
         fw.append("Customer Status");
         fw.append(',');
         fw.append("Restructure Date");
         fw.append(',');
         fw.append("Total Provision");
         fw.append(',');
         fw.append("Limit Sanctioned");
         fw.append(',');
         fw.append("Principal");
         fw.append(',');
         fw.append("Balance");
         fw.append(',');
         fw.append("AccountID");
         fw.append(',');
         fw.append("Collateral SL No");
         fw.append(',');
         fw.append("Issue Date Of Collateral");
         fw.append(',');
         fw.append("MaturityDate Of Collateral");
         fw.append(',');
         fw.append("Subsidy");
         fw.append(',');
         fw.append("Guarantor SL No");
         fw.append(',');
         fw.append("Guarantor Rating Agency ");
         fw.append(',');
         fw.append("External Rating of Guarantor");
         fw.append(',');
         fw.append("Rating Expiry Date");
         fw.append(',');
         fw.append("Guarantee Amount");
         fw.append(',');
         fw.append('\n');
         for (Iterator it = list.iterator(); it.hasNext(); )
              reportBean = new AdvDetailReportBean();
              reportBean = (AdvDetailReportBean)it.next();
              fw.append(reportBean.getCustomername());
              fw.append(',');
              fw.append(reportBean.getConstitutionCode());
              fw.append(',');
              fw.append(reportBean.getCustomerStatus());
              fw.append(',');
              fw.append(reportBean.getRestructureDate());
         fw.append(',');
         fw.append(reportBean.getTotalProvision());
         fw.append(',');
         fw.append(reportBean.getLimitSanctioned());
         fw.append(',');
         fw.append(reportBean.getPrincipal());
         fw.append(',');
         fw.append(reportBean.getBalance());
         fw.append(',');
         fw.append(reportBean.getCurrentValue());
         fw.append(',');
         fw.append(reportBean.getAccountNumber());
         fw.append(',');
         fw.append(reportBean.getColCRMSecId());
         fw.append(',');
         fw.append(reportBean.getIssueDt());
         fw.append(',');
         fw.append(reportBean.getMarturityDt());
         fw.append(',');
         fw.append(reportBean.getUnAdjSubSidy());
         fw.append(',');
         fw.append(reportBean.getGuarantorFacilityId());
         fw.append(',');
         fw.append(reportBean.getRatingAgency());
         fw.append(',');
         fw.append(reportBean.getExternalRating());
         fw.append(',');
         fw.append(reportBean.getExpDtOfRating());
         fw.append(',');
         fw.append(reportBean.getGuaranteeAmt());
         fw.append(',');
         fw.append('\n');
    }

    You don't seem to be writing anything to the response at all. Yes, you create a StringBuffer and write lots of stuff to the StringBuffer but then you do nothing else with that buffer.

  • Get the WSDL-File used for proxy generation

    Hello everybody!
    I created a Web Service Proxy:
    SE80 -> Select Package -> Enterprise Services -> Client Proxies -> New -> WSDL Source: Local File.
    Everything worked out fine. I was able to create that Proxy.
    Now I would like to look at the WSDL-File that has been used:
    If I take a look at that Proxy by SE80 -> Select Package -> Enterprise Services -> Client Proxies -> [Select Proxy] -> Display in new Window -> Goto: The Menue Entry "Display WSDL Document" unfortunately is disabled.
    I have not configured the integration builder.
    Is there a possibility to get the WSDL-file that has been used for the generated proxy? Does anybody know, if the WSDL-file, that has been used for the proxy generation is archived somewhere in the system?
    Thanks,
    Andreas

    Hello,
    Thanks for your reply.
    I am using SAP ECC 6.0:
    SAP_BASIS     700     0010     SAPKB70010     SAP Basis Component
    SAP_ABA     700     0010     SAPKA70010     Cross-Application Component
    Unfortunately the tab "Proxy Generation" at Utilities -> Settings is not available with my release.
    Any other idea?
    Greetings,
    Andreas

  • Deploy projects over FTP and Secure FTP connections

    This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusionBuilder/2.0/Using/WSf01dbd23413dda0e1736ebc1213a528a b0-7feb.html

    This doc is invalid for ColdFusion Builder 2.

  • Getting List of SQL server and on selection of server get List of Databases using SMO

    Hi,
    I need to have functionality where I need to populate List of available SQL servers from local network, and when i select SQL server from list, get the list of Databases from that Server.
    For this i referenced SQL SMO Dll's and placed two drop down, one lists Server names, and one lists Database names.
    Dlls refered are:
    Microsoft.SqlServer.ConnectionInfo.dll
    Microsoft.SqlServer.Management.Sdk.Sfc.dll
    Microsoft.SqlServer.Smo.dll
    Microsoft.SqlServer.SqlClrProvider.dll
    Microsoft.SqlServer.SqlEnum.dll
    Above DLL's i have copied from SQL server SQL server 2008 installed location
    C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies
    DLL version : 11.0.3000.0
    Code i have used is:
    private void MainForm_Load(object sender,
    EventArgs e)
       DataTable dataTable = SmoApplication.EnumAvailableSqlServers(false);
       cmbServers.ValueMember = "Name";
       cmbServers.DataSource = dataTable;
    //Now, load Databases on selection of Server combo box.
    private void cmbServers_SelectedIndexChanged(object sender,
    EventArgs e)
       cmbDatabases.Items.Clear();
       if (cmbServers.SelectedIndex != -1)
          string serverName = cmbServers.SelectedValue.ToString();
          Server server = new Server(serverName);
          try
             foreach (Database database in server.Databases)
                cmbDatabases.Items.Add(database.Name);
          catch (Exception ex)
             string exception = ex.Message;
    It works where SQL server is installed, but in systems where no SQL server is installed, it is not working, it is not returning list of SQL server and so database list.
    Query is> can you please help me in this regard, what i am missing here, do i need to install any client component to use this?, or anything else what i need to do to make this functionality work.
    Thanks,
    Hemal

    Thanks Michael for replying.
    I have gone through the reply, and the link on how to get the SMO library installed.
    "To install the Client Tooks SDK without installing SQL Server, install Shared Management Objects from the SQL Server feature pack.
    If you want to ensure that SQL Server Management Objects is installed on a computer that will run your application, you can use the Shared Management Objects .msi in the SQL Server feature pack."
    I have few questions on "Shared Management Objects .msi" 
    Where do i get "Shared Management Objects .msi".
    only installing this msi will install SMO?.
    Can i ship this msi with my application installer?
    do i need to install x86 on x86 system and x64 version of msi in x64 system, or x86 can work fine with both, my application
    is x86 only.
    Thanks,
    Hemal

  • I have downloaded Firefox 4 times, using MSN9 and IE8 browsers. I cannot install Foxfire and everytime I try, I get a "This file is corrupt" message. Suggestions?

    Excuse me...I meant Firefox...NOT FOXFIRE. Duh on me. I'm not sure what other details you need? I'm on 56K dialup. Dell PC. Windows XP Professional. I have Malwarebytes and Windows Defender virus protection software, but neither one has alerted me to any type of problem with the your Firefox download file when downloading or attempting to install. I simply get a flyout which reads "Corrupt file." I can only assume it is a Micrsoft Message.

    If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Firefox crashes when I select FILE then OpenFile, and sometimes it lets me get to a file list, but when I select that it crashes

    This has been an ongoing problem, and it does not occur with IE, Opera, Chrome, Browzar, Safari or Avant browsers.
    If I click "File" and then "Open File" it will frequently crash. Sometimes I can navigate to an actual filename in a director, however clicking on that file to open it will crash it. The files can be text files, web pages or photos. It crashes equally among them, or any other file I try to open. There are approximately 65 forwarded messages created by my browser and sent each time this happens but I have never heard from anyone at Firefox about it.

    Ooops. I haven't updated my sig in a while. I'm on 10.8.2 and it happens on a late 2008 Alu Macbook.

Maybe you are looking for

  • SAP ISU

    Hello - I am a technical consultant for last 4 yrs. My current project demands SAP IS-Utility knowledge, mainly on the Technical front. Can someone share his/her technical knowledge in ISU ? Thanks much in advance.. Kapil Sharma

  • Oracle Number and Java Format Mask Issue

    I have a oracle number column, in my view object it is of type BigDecimal and the query column type is NUMBER I put the following format mask in the hints section #####.00 with a format type of Number, Yet when I run the application, I always get the

  • Downloading files contained in a configuration

    I have created a configuration with many files. I can't seem to figure out how to download all the files contained in the configuration. For example: In the RON, expand the configurations node, select MyConfiguration, right-click... no download files

  • Insert statement between ver. 10.2.0.1 and 10.2.0.5

    Last week I helped user to clone a schema from Oracle ver. 10.2.0.1 to 10.2.0.5. They reported to me that one of the SQL query doesn't work anymore in newer version of Oracle. The statement seems like following: insert into TABLE_01 T (col1,col2,col3

  • I've updated my phone now I can't turn it on

    I've updated my phone now I can't turn it on