Dynamic folder name (when reading file in file adapter)

Hi,
I have to read a file always with the same name but it can be in different directories.
For example:
FTPHome/Folder1/file.txt
FTPHome/Folder2/file.txt
I've tried to define a mask for path name but it doesn't work:
Something like this /FTPHome/Folder*/
It's possible to do that what I'm trying

Sudharshan nice... indeed you are right! You learn something everyday
Advanced Selection for Source File
If you want to set an exclusion mask for the File Name specified above, or if you want to specify multiple directories using a file name mask and exclusion mask, set the Advanced Selection for Source Fileindicator.
○       Specify an Exclusion Mask for the file name specified above.
You want to process all files that have the extension '.txt', but want to exclude all files that begin with the letter 'a'. To do this, enter .txt for File Name, and a for Exclusion Mask.
○       You can enter additional specifications for source directories, file names, and exclusion masks in the table. This data is processed in addition to the details specified above.
Edited by: Alex on Jul 8, 2008 11:11 AM

Similar Messages

  • Dynamically create variables when read from txt file

    hi,
    need a little help on this one.
    im reading in the name of user defined classes from a text file into a string array. once i have them all read in i want to be able to declare instances of each class, but how?
    i have the string array with the names and i know that il have to use a loop with a counter to give each instance a unique name but im stomped on how to do the rest.
    anyone have any ideas?
    many thanks in advance.

    im getting it in the following line:
    Class cls = Class.forNames(behList[ i ]);
    behList is a list of names, im trying to loop through
    it and create an instance of each object in the list
    using
    Object x = cls.newInstance();
    but it never gets to this line cos of the top one.
    any ideas?stupid bb codes...
    now are you sure you got that error by java and not Eclipse(or another IDE)
    cause afaik, if the VM cant find the class, it will throw a ClassNotFoundException...

  • Indesign CS4 "forgets" file name when saving as Postcript file.

    Like the title says Indesign CS4 "forgets" file name when saving as Postcript file.
    Example:
    I open up indesign CS4 and open up a file called "test5". Then I go to the print menu and save it as a postscript file. Once the save as dialog box comes up it wont say "test5" but it uses whatever file name I used last time I created a PDF. 
    I want indesign to recognize that when I create a postscript file that I want it to be named the same way as my file that is open at that moment. Changing the file name every time is not bad when they are called "test5" etc but here at this company we use super long file names and it's a pain to change it every time.
    Funny thing: Some machines here do it the way in the example but other machines will do it the correct way by using the same name in the save as box.
    Any suggestions on how to fix this? If something is not clear just ask!

    How about this - it's a workaround, I can't change ID or your system.
    I'm big on EXACT filenames also, case and space sensative. Do a "Save As" before printing - the file name should be correct and highlighted, ctrl+c copy, escape/cancel the Save As. Paste in the filename during the Save as Postscript File.

  • Does any one know what the matrix.dms is? And why it is in my picture folder? When I open this file the unarchiver takes over and I see my entire hard drive when I scroll down I see the matrix.dms file with in the unarchiver.

    Hello everyone. Does anyone know that the matrix.dms file is? And why it may have came to be in my picture folder? When I opened the file the unarchiver took over, then I saw my files in the unarchiver window. I then scrolled down and I saw the same matrix.dms file within the unarchiver window. I made a video of what saw when I tried to open the file, so as to aide in your understanding of reason for my perplexion at this file. Thank you for your help. https://www.youtube.com/watch?v=2QeWH9hRnro&feature=youtu.be

    Hi EMT-B,
    It sounds like you have done all the troubleshooting needed to narrow down your issue with the iPhone camera to hardware. Based on the information you have provided, it appears your iPhone needs to be serviced. The following link should help you get started with the process and has links with additional information on topics such as warranty and service pricing, battery replacement, and express replacement service.
    Apple - Support - Service Answer Center
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipho ne
    You may need to change the country when you get to the page.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Receiver File adapter: dynamic folder name based on file name

    Hi there,
    is it possible to set up one communication channel that will use different target folders based on file name?
    E.g.
    File abcdef will be saved to /root/abcdef/abcdef or /root/abcdef/abcdef.txt
    File xyz will go to /root/xyz/xyz or /root/xyz/xyz.txt
    I know I could use Sender/Receiver Service, Interface/namespace or data from message for variable substitution but could not find an easier solution for this scenario than to create multiple communication channels.
    Thanks.

    If you haven't a message mapping, then you can create only an interface mapping with an abap mapping.
    In your abap mapping:
      DATA l_record type mpp_dynamic.
      l_record-namespace = 'http://sap.com/xi/XI/System/File'.
      l_record-name = 'FileName'.
      l_record-value = "your filename"
      dynamic_configuration->add_record( l_record ).
      l_record-namespace = 'http://sap.com/xi/XI/System/File'.
      l_record-name = 'Directory'.
      l_record-value = "your directory ".
      dynamic_configuration->add_record( l_record ).
    Afther that, you must activate Adapter Specific Message Attributes (directory and/or filename) in your target communication channel .
    Regards,
    Carme.

  • Error when reading a XML File

    When I am reading an XML file in a folder I am getting extra characters like squares before and after each and every character of the XML file.
    Why is this so.I thought they are spaces and trimmed it but i didnt work.I replaced thinking as escape characters and that also did not work.But when I am prionting the ASCII value of the first character of the file I am getting -17.
    Please can anyone help me out of this.
    Thanks,
    Sravanthi

    public class Example()
    File file = new File("C:/SCTMUnZip/"+files);
    System.out.println("Files inside the directory:::"+files[i]);
    String filedata = getContentsofFile(file);
    if(file.getName().contains(".xml"))
    InputStreamReader reader = new InputStreamReader(new FileInputStream("C:/SCTMUnZip/"+files[i]+"/"));
    System.out.println("Encoding Style:::"+reader.getEncoding());
    byte[] filebytes = filedata.getBytes("UTF-16");//byte[] utf8String = Encoding.UTF8.GetBytes(srcString);
    System.out.println("This is a XML File...");
    file1.setMStrFileName(files[i]);
    file1.setMPFileData(filebytes);
    //file1.setMStrFileName(files[i]);
    /*Pattern pattern = Pattern.compile("[^]");
    Matcher matcher = pattern.matcher(filedata);
    String str = matcher.replaceAll("");
    filedata = str;
    System.out.print(str);*/
    else
    System.out.println("This is a normal file...");
    file1.setMStrFileName(files[i]);
    file1.setMPFileData(filedata.getBytes());
    static public String getContentsofFile(File file)
    StringBuilder filecontents = new StringBuilder();
    try
    BufferedReader input = new BufferedReader(new FileReader(file));
    try
    String line = null; //not declared within while loop
    * readLine is a bit quirky :
    * it returns the content of a line MINUS the newline.
    * it returns null only for the END of the stream.
    * it returns an empty String if two newlines appear in a row.
    while (( line = input.readLine()) != null){
    filecontents.append(line);
    filecontents.append(System.getProperty("line.separator"));
    finally {
    input.close();
    catch (IOException ex){
    ex.printStackTrace();
    return filecontents.toString();
    The files in the folder are log.txt and output.xml(has UTF-16 as the encoding style in the first line).log.txt is read fine but output.xml is not.

  • When reading from the file validate the date  'DD/MM/YYYY'  format

    Hi,
    reading from the file ,validate the date format 'DD/MM/YYYY'.
    Thanks & regards
    venkata

    I suppose that you are writing a program in some programming language, probably PL/SQL. So, you can use TO_DATE function and handle the exception when it occurs.
    create or replace procedure tstdt
    as
      stdt varchar(10);
      dt date;
    begin
      stdt := '20/10/2006';
      dt := to_date(stdt);
       dbms_output.put_line('date is correct
    exception
    when others then
      dbms_output.put_line('Invalid Date');
    end;[],
    Miguel

  • Characters y and b appear when reading a text file

    The vi shown in the picture opens a text file from hard drive with "Open/Create/Replace File" and with "Read from Spreadsheet File".
    Then the vi displays the text in the respective indicators. 
    In both indicators, there is a y and b that appear as the very first first characters.
    It's not exactly a y and b. The y has two dots over it and the stem of the b hangs low, a non-English script. 
    In Word and Notepad these charcters don't show up. The first character is a zero as I originally wrote. 
    The text file was originally created in Excel and then saved as unicode text. 
    From whence do these funky letters come? and how do I get them to leave? 
    Also, it looks like the text in both indicators is adding a blank line after each line. That doesn't show up Notepad or Word either. 
     

    Carmen92126 wrote:
    The text file was originally created in Excel and then saved as unicode text.
    There's your problem: unicode.  You might want to check out this quick thread: Config file "byte order mark"
    Yes, by saving as Unicode, you have a couple of extra bytes that most text editor know to ignore.  But LabVIEW just gives you the raw data.

  • Allow custom tag on folder name when importing

    I like the "2007-07-08" folder name syntax, but I would like to append a name to it, such as "2007-07-08 Ski Trip" or "2007-07-09 Pets". It is painful to have to go to custom, change the template, go back, import, and do this again and again. How about just an extra textbox on the import screen for "Title" of the import, which can be appended to the date?
    Thanks.
    Running Vista Ultimate.

    I miss the same thing, and others have stated this aswell! Just like file naming has the {custom text} option, folder naming should have exactly the same!
    The folder name preset YEAR-MONTH-DATE works fine, but I also want to add a custom text at the end, just like SoCalSteve.
    > How about just renaming the folder(s) after the import(s) are complete. This can done in the Folders panel using Rename on the context menu; a template isn't required.
    I know this is not too hard. But the idea with LR is to avoid extra steps like this. When you're done with the import dialog, you should be ready for working / reviewing photographs. Starting renaming folders after every import prooves that the import dialog needs more work.

  • How can you keep the file name when using "Download Linked File As..."?

    I'm a longtime PC user finally making the transition to Mac.  Some of the tasks that seemed so simple in Windows have really stumped me!  One of the tasks I do frequently is download files into specific folders.  After much looking, I finally found the "Download Linked File As..." option if I right-click on the download link.  The problem is, when I choose this option, I lose the file name.  I get a window in which I can choose the desired folder, but the filename is always "0".  If I want to keep the filename (and I usually do), I have to type it in manually.  Is there anyway around this?

    You can post a screen shot by clicking on the liitle Camera icon above your reply.  :)
    Just checked on 10.7.4+, still the same, something is borked about your install, to see if we need to re-install...
    To find out if it's system wide or user specific, try this...
    Open System Preferences>Accounts, unlock the lock, click on the little plus icon, make a new admin account, log out & into the new account.
    Does it work in the new account?

  • I just downloaded iOS 8 on my iPad air. This has caused the file names of all of my PDFs in iBooks to revert to their original file name when I downloaded the file, not the custom file names I gave them after downloading the files. In the list of fil

    PDF file names changed with iOS 8

    Further to above
    Progress Notable!
    But before I outline the details, I wish to apologise to APPLE for laying the blame at their doorstep for loosing or misplacing those PDFs I have on the iPad 1, when I set up my iPad Air , by restoring from the backup of iPad 1, thus copying all data from the old to the new.
    NOT REALLY THEIR FAULT AT ALL
    Because a lot of the many PDFs had the same name, ie PDF.pdf, probably my fault more than anybody else's, so I can't blame APPLE for that. Just goes to show one should be a little more precise in creating these portable documents.
    No wonder the poor program " lost its' marbles" when doing the updating and conversion/transfer.
    However, I was able to recover most of them by personal email, and extracting and RENAMING the PDFs as I located them in their new home.
    Those PDFs that we're locked an thus not email-able , I will deal with by
    Viewing
    Photoeing (if that's how you spell it).
    And re-building the PDF from the photos, in unlocked format, after transferring these files either by Bluetooth or Wi-Fi, from the old to the new iPad.
    So all is not lost, and I am thankful that my cautious approach to this matter in the first place, gave me the ability for this successful recovery.
    That's my story and I'm sticking to it.
    I hope this little story of my saga/experience may prove helpful to others yet to cross the chasm of updating.
    Regards to all, including APPLE.
    NICE STUFF YOU MAKE.

  • JAI: FileSeekableStream returns an exception when reading an image file...

    Exception Access Denied (java.io.filepermission temp read) is return when I try to run an applet that uses JAI and the JRE is 1.5.x
    Everything works well in the 1.3.x world.
    My applet is signed by Thwate and I want to able to distribute my applet without telling every user to modify the java.policy file.
    Is there any work around for this problem?
    Any help would be greatly appreciated.
    Thanks Allen

    When file is read your main bpel process doesn't come in the picture, it is done via File adapter. If adapter fails to read, you can call second bpel process (rejection handler, which implements specific interface and reads as opaque).
    In nut-shell, you will need one more proccess, but that can be genaric and shared across the enterprise.
    Regards,
    Chintan

  • Hi, error message: "illegal file name" when exporting a .mov file in final cut 7.

    why I got this error message? I used this name before and wish to save it after some editing. System asked me "do I want to replace it?", I answered 'yes', then "illegal file name came up?"
    It accepted it the first time, why I got this name the second time ?
    Please help. thanks.

    Can't say why but it happens; maybe a bug. (If it is we know it will never be fixed.) Anyway, it's not a bad practice to use "save as" – appending the date, or some other code to be able to track versions.
    Good luck.

  • Itunes Freezing when reading a music file from my external harddrive

    I am using I tunes version 8.2.1 and Mac OS X 10.4.11
    I am using an external hard drive to house my ITunes Library. I have used this set up before with out issue. I then had a hard drive failure. I recovered my music and was able to reformat. Now when I try to play a song or do anything in ITunes while the hard drive is attached, Itunes is really slow and most of the time does not play the song. I tried uninstalling Itunes but that did nothing and I CAN NOT UPGRADE TO ITUNES 10.
    Is this an issue with ITunes or is it the harddrive?

    a wma file is a Microsoft file. it will only play in Windows media player and afew other players that have basicly paid Microsoft a fee to have there players able to play wma files. iTunes will not play wma files at all BUT itunes makes it easy as pie to convert those files into something it can play long as there not protected wma's you may have bought online. First goto edit, preferencs. Once there in the settings, hit the "Advance" tab at top, you will see 3 more tabs appear below. hit the "Import" tab there you will most likly want to set it to "MP3" so you will be able to play all songs u import or rip from CDs on iTunes and other apps. Below that you can set the bit rate. after that just rightclick all the songs with the ! beside them and select Import or convert section to MP3

  • Change folder name to Date 'n' moving files

    Hi Folks,
    I know how to create a folder ,now i want to create a folder with system date.And also wants to move files(which are in a seperate folder)to that folder.
    Thnx in advance..
    Cheers,
    smith

    to get the system date, use Calendar.getInstance(); which will give you a calendar that you can turn into a date easily
    to move files, use method renameTo in class File

Maybe you are looking for

  • Class not found error!!!

    Hello, I wrote a program that would read data from a file (present in one of my folders). I developed it as an applet and am able to see the result in appletviewer, but unable to see it in the browser(IE6-WIN2000). I did the HTMLConverter procedure a

  • Adobe licensing query

    I have installed Flash CS5 and Flash 8 on single computer system to frequently work on both softwares Hence, my query is that how many Flash licenses required to purchase to me to complain with adobe licensing? If I have purchased one Flash CS5 licen

  • THREAD - CRAZY PROBLEM

    Hi guys, I try to construct a thread and get a crazy problem. public class MyThread extends Thread{   public void run()     System.out.println("TEST");   }//End run()   public static void main(String argv[])     MyThread app = new MyThread();    app.

  • Creating another class window within one class

    Ok I have a main window class, at some point if you click some button I want it to make the first window invisible and have this other, second class, appear, and further on, for both to talk to eachother. These are applets, and I have tried having on

  • HT4053 can't figure out how to change the language showing the time on my home page, etc...seems to be some asiatic script...sos

    Setting up my Iphone I must have overlooked something the result of which is time and other information appearing in some foreign, I think Asian, script of some kind.  The vast majority of information, App names, etc, are displaying in English as nee