Read a file having name (TACACS+ Accounting active.csv)  in java

how to read a file having name (TACACS+ Accounting active.csv) in java through buffer reader

Did you take even a millisecond to try anything?
Here's my hint.
"The same way you read anything else with a BufferedReader."

Similar Messages

  • How to read ZIP files(having PDFs,Image) using MQ Series link for R/3

    Hi,
    1)Is it possible to transfer a zip file (having an image or pdf) using IDocs in SAP 4.6C using MQ Series link for R/?
    Scenario: "MQ Series link for R/3" converts Business-Reports from a third-party software,into SAP IDocs.Each Business-Report contains one XML file and one ZIP file.
    2)Being on ABAP side,do I have to worry about how the zip file would be converted into IDocs?
    Detailed descrption:
    This scenario requires integration of a non-SAP software which talks in XML with SAP R/3(4.6C).The customer has decided to go with 'MQ Series link for R/3' (which integrates any non-SAP application running on IBM MQ Series to R/3,by converting data(in any format) into IDocs).He is not ready to go for XI.
    The Problem area is a functionality which requires the non-SAP software to send XML file along with an attached Zip file.So,XML document,basically,has a 'zippedFile' XML element having actual file in XML keyword 'file'.
    This XML document ideally, should be converted by the subsystem(MQSeries link for R/3) into IDocs i.e. into a stream which could be stored in a table on R/3 side and later, sent back to the non-SAP software through MQ Series link to be converted into zip-file again with corresponding pdfs,images.I want someone who has worked in a similar scenario to confirm this.

    Hi,
    I have a feeling I have posted this question in the wrong forum or maybe I will let you decide this.Any help would be appreciated (even the right forum name).
    My scenario requires integration of a non-SAP software which talks in XML with SAP R/3(4.6C).The customer has decided to go with 'MQ Series link for R/3' (which integrates any non-SAP application running on IBM MQ Series to R/3,by converting data(in any format) into IDocs).He is not ready to go for XI.
    The Problem area is a functionality which requires the non-SAP software to send XML file along with an attached Zip file.So,XML document,basically,has a 'zippedFile' XML element having actual file in XML keyword 'file'.
    This XML document ideally, should be converted by the subsystem(MQSeries link for R/3) into IDocs i.e. into a stream which could be stored in a table on R/3 side and later, sent back to the non-SAP software through MQ Series link to be converted into zip-file again with corresponding pdfs,images.I wanted someone who has worked in a similar scenario to confirm this.

  • Reading XML file having various foreign languages from web application.

    Greeting..
    I'm dealing with a so-called serious problem where-in:
    I've to read one of the configuration files(XML files) having values in different foreign languages (like Chinese, Japanese, Arabic etc). I've to read that file contents, in as it is form, in such a way that user can read / change the data from the web application.
    I'm showing the XML file inside the TextArea (the HTML <textarea> tag. While reading this file, it got converted to junk values instead of actual ones. While saving this file it changes those original values to junk in file as well.
    I'm using SAX parser with DefaultHandler.
    Better suggestions are welcome.
    Thanks in advance
    Regards

    rikslovein wrote:
    Better suggestions are welcome.You have a number of places where data corruption could occur. You have not yet identified where it occurs. When you know where it occurs it would be much easier to determine a solution.
    Do NOT display the characters to determine the problem. Instead take a small sample and print the numeric values. And do that at each stage/layer until they do not match.

  • Reading a file whoes name is dynamically modified by a predecessor program

    Hi All,
    I have a requirement where I need to read a file from application server but the catch is the file name is stamped with date and time by a predecessor program.
    Thanks,
    Gaurav.

    And so what? Do you want to read the list of files with a given prefix? Read [abap wiki - working with files|http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles] then search forum.

  • How to read only files with a certain format from folder with java

    I have this folder on the server and I only want to read files from this folder on the server... I only want to read files with the files format starting with error_ and ending with xml... an example of a file would be..
    error_123.xml
    I want something like this
    if(fileName.startsWith("error_") && fileName.endsWith(".xml")){
    but which java package will I have to use to read the file from the directory...

    Create an implementation of the java.io.FilenameFilter interface to match the pattern you need.
    Create a java.io.File object for the folder.
    Use the File.listFiles(FilenameFilter) method to get an array of File objects for the files in the folder that match the pattern.
    For each file in the array, create a FileInputStream, wrap it in an InputStreamReader, and wrap that in a BufferedReader (assuming you want to read the XML files as character streams).

  • How to read dynamic file names in RSEINB00?

    Hi, ABAP Gurus,
    actually I'm a PI Consultant. Now I have a scenario to use the report RSEINB00.
    In the Applicaton Server i put ASCII IDocs with the following name convension: <static name>+<time stemple>:
    SAPIDOC20111127-224128-952.txt
    SAPIDOC20111127-224129-115.txt
    I created a new port in WE21 and the Outbound file and Inbound fiel tabs haben the same configration:
    physical directory: /ABC/DEV100/inbound/
    Function module: EDI_PATH_CREATE_DATE_TIME
    Inbound file: SAPIDOC.txt
    To execute the report RSEINB00 I must give the complete file name and port. It is not convenient.
    My target is, with a job to run RSEINB00 once daily to read all files with name "SAPIDOC + <time stemple>" full automatically.
    Is it possible? how to figure it out?
    thanks a lot in advance! <removed by moderator>.
    Regards
    Rene
    Edited by: Thomas Zloch on Nov 29, 2011 5:23 PM

    with the extension of the standard report RSEINB00 i solved this problem. here is some code:
    DATA:
      dir_name  LIKE  epsf-epsdirnam,
      file_mask LIKE  epsf-epsfilnam,
      g_message_fields LIKE edimessage.
    DATA:
      filename LIKE  edi_path-pthnam,
      filename2 LIKE edi_path-pthnam,
      myport TYPE EDIPO-PORT.
    DATA: h_EDIDC     LIKE EDIDC.
    DATA:
      wa TYPE file_table.
    DATA:
      t_dir_list TYPE STANDARD TABLE OF epsfili WITH HEADER LINE,
      itab TYPE table of file_table WITH HEADER LINE.
    *The directoy, where the Markant ASCII IDocs are droped by XI.
    dir_name = '<.../inbound>'.
    *File mask of ASCII IDocs.
    file_mask = 'XYIDOC.'.
    *File port.
    myport = '<Portname>'.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
      EXPORTING
        dir_name               = dir_name
        file_mask              = file_mask
      TABLES
        dir_list               = t_dir_list
      EXCEPTIONS
        invalid_eps_subdir     = 1
        sapgparam_failed       = 2
        build_directory_failed = 3
        no_authorization       = 4
        read_directory_failed  = 5
        too_many_read_errors   = 6
        empty_directory_list   = 7
        OTHERS                 = 8.
    IF sy-subrc <> 0.
      MESSAGE e600(fr) WITH 'No ASCII IDoc exits'.
    ENDIF.
    "BREAK-POINT.
    *The old ASCII IDocs are stored in a dataset and copied with new file name sent_<original name>
    LOOP AT t_dir_list.
      CONCATENATE dir_name '/' t_dir_list-name INTO filename.
      CONCATENATE dir_name '/sent_' t_dir_list-name INTO filename2.
    open dataset filename for input in text mode.
    open dataset filename2 for output in text mode.
    if sy-subrc = 0.
      do.
        read dataset filename into wa.
          if sy-subrc <> 0.
           exit.
          endif.
      transfer wa to filename2.
         append wa to itab.
           enddo.
    endif.
    close dataset filename.
    *loop at itab into wa.
    transfer wa to filename2.
    *endloop.
    close dataset filename2.
      PERFORM inbound_processing USING filename.
    ENDLOOP.
    *&      Form  inbound_processing
    FORM inbound_processing USING filename TYPE edi_path-pthnam.
    do inbound processing from file
      CALL FUNCTION 'IDOC_INBOUND_FROM_FILE'
        EXPORTING
          file_name            = filename
          port                 = myport
        EXCEPTIONS
          file_open_failed     = 1
          marker_to_be_deleted = 2
          read_file_failed     = 3
          idoc_not_stored      = 4
          file_delete_failed   = 5
          marker_modify_failed = 6
          event_create_failed  = 7
          first_record_invalid = 8
          invalid_record       = 9
          OTHERS               = 10.
      IF sy-subrc <> 0.
    fill message fields for exception handling from system fields
        MOVE-CORRESPONDING sy TO g_message_fields.
    error handling using the 3.0 business workflow
        CALL FUNCTION 'IDOC_ERROR_WORKFLOW_START'
          EXPORTING
            docnum                  = 0
            eventcode               = 'EDIM'
            mess                    = g_message_fields
          EXCEPTIONS
            no_entry_in_tede5       = 0
            error_in_start_workflow = 0
            OTHERS                  = 0.
    do not care for exceptions here
        COMMIT WORK.
    append message for RFC
        MESSAGE ID     g_message_fields-msgid
                TYPE   'A'
                NUMBER g_message_fields-msgno
                WITH   g_message_fields-msgv1 g_message_fields-msgv2
                       g_message_fields-msgv3 g_message_fields-msgv4.
      ENDIF.
    ENDFORM.                    "inbound_processing

  • LSMW file read & convert file name

    Guys
    This is pretty hot - any ideas to automate will be helpful.
    Is there a way to programmatically change the default name for the LSMW file read and file convert names?
    For example if read & conv file is
    Plant_Master_Material.lsmw.read & Plant_Master_Material.lsmw.conv,
    I want to programmatically append userid and make the file name look like
    Plant_Master_Material_myid.lsmw.read & Plant_Master_Material_myid.lsmw.conv.
    It can be done manually via step specify file in LSMW, but I want to automate that step.

    Hi Iqbal,
    Its not possible to make it automatically,
    name for the LSMW file read and file convert will as such like this
    PROJECT_SUBPROJECT_OBJECT.lsmw.read & lsmw.conv.
    This can not be changed...if u need it u can have u r userid under u r object name...
    Reward if useful..

  • FTP Adapter to read multiple files from a directory. Not through polling.

    Dear Friends,
    I would like to know is it possible to configure the FTP adapter in Oracle BPEL 10.1.3.4 to read multiple files (different names, same structure) from a given directory. I do not want the BPEL to do a polling. Instead when I submit the BPEL process it should read all files from the directory.
    I was looking at the option of Synchronous read but I am not able to specify wild card in the file name field. I do not know the file names at the time of reading.
    Thanks for your help!

    Hi,
    While you read the file, you can configure an adapter property in 'Receive'. This will store the filename, this filename can be used for sync read as the input parameter.
    1. Create a message type variable called 'fileheader'. This should be of type Inboundheader_msg (whatever relevant Receive activity).
    2. This variable will contain three parts - filename, FTPhost, FTPPort
    3. Copy this fileheader to 'Syncheader'.
    4. syncheader can be passed as an adapter proerty during sync read of the file.
    During Receive and Invoke, you need to navigate to 'Adapter' tab to choose the created message type variable.
    Let me know if you have further questions.
    regards,
    Rev

  • Can I open a file which name contains GB18030 character

    Hi,
    I am try to using Java to open a file in XP, the file's name contains some GB18030 character, is Java support that process?
    Thanks,

    Wouldn't it be easier just to try it?

  • A Few SEO Questions: Alt="" text and file/folder names.

    I've been reading about the Dark Art of SEO and frankly, a lot of it is more confusing than I anticipated.  Anyway, I'll summarise a bit here.I have read that:
    File/folder names are better with meaningful words and hyphenated words.  so DCM000123.jpg in a folder called galimg would be better as: /gallery-images/painting-title-here.jpg
    Alt="" text can add to the content of your pages.
    My thinking underneath this relates to a gallery site I built with around 200 individual paintings in it.  So the site has a lot of content but not a lot of text.  I wonder if I should start trawling through all of this to change the file names and folders and add alt="" text more meaningfully to help with SEO?
    So if my thinking is OK, here are the questions.
    How would you put the alt="" text on individual images?  I imagine that it should just be a straight-forward, what-you-see description?  But there are a few other options.  Suppose I have an image that the artist has titled, "Cattle on a Hill" and it's an oil on canvas.  I could make that into,
    alt="Oil on Canvas: Cattle on a Hill" or
    alt="Cattle on a Hill" or
    alt="A group of cows grazing in pasture under moonlight." or
    Suppose I have 20 images in a portrait gallery:
    alt="Portrait.  Oil on canvas: Joe Bloggs" or
    alt="Portrait.  Joe Bloggs" or
    alt="Man with grey hair wearing a blue shirt sitting on a bench" or
    alt="Portrait painting.  Oil on canvas. Joe Bloggs: Man with gray hair wearing a blue shirt sitting on a bench"
    The second part of the question also includes the problem that if I have 20 images in a single gallery page and I put "Portrait painting" in each alt="" text is that going to look like key word stuffing?
    Now on to the file name thing.  Should the file names be portrait-painting-01 and so on or should they be Cattle-on-hill or what?
    Final question: am I making too much of all this?
    Thanks
    Martin

    First of all, stay away from spaces in file names AT ALL COST.
    The examples you cited would look like:
    alt="Oil%20on%20Canvas:%20Cattle%20on%20a%20Hill" or
    alt="Cattle%20on%20a%20Hill" or
    alt="A%20group%20of%20cows%20grazing%20in%20pasture%20under%20moonlight."
    to an SE crawler.
    If you really want effective picutres, use Photoshop or Fireworks to embed metadata and THEN add them to your site.
    Alt tags means the text that would appear if the image didn't for some reason. It also helps with accessibility for visually impaired viewers who use plug-ins to allow their browser to "speak" the images to them when the page loads.
    <img src="img/example-1.jpg" width="128" height="160" alt="example-1.jpg" />
    Above is an example of how to add alt text. Dreamweaver actually loads the alt tag automatically unless you've turned it off somehow.
    Either put the info in the Alt box in the properties panel, or in code view, add it between the quotes.
    To the second part of your question, Alt tags are meant for SEO with the images only (Like when you search for images of a certain name or containing certain tags)
    and really have little effect on the page SEO itself. For that type of optimization you want Keywords, and Descriptors in the <head> portion of the
    individual page:
    <meta name="google-site-verification" content="Optimizer code would go here" />
    <meta name="Description" content="Page name, site name, business name, location, phone number, etc. goes here"/>
    <meta name="Keywords" content="Restaurant, Sports bar, Catering, Hotel, Gallery, Car Dealer, Exterminator or whatever describes the site and page as well as content of the pages"/>
    <meta name="author" content="your name here"/>
    <meta name="robots" content="index, follow"/> (This tells search engine crawlers to index this page and each one you add it to,  and follow them site wide)
    <meta name="revisit-after" content="7 days"/> (This tells the crawler when to revisit for updates after it has indexed the site)
    To your last question. No, you're not making too big a deal out of it, if you're talking about exposure for a business. If it's a personal gallery of your favorite vacation pictures? You just might be.

  • When I use migration assistant it won't let me use my account name that I'm signed in with.  It requires me to select a different user name and then creates a separate account where my files live.  Why can't I select the user name and account name I have?

    I'm trying to migrate my music and pictures over to my new iMac.  When I use the migration assistant it connects to my PC fine but it won't let me use the account name and username that I have created as the admin.  It requires me to create a new user account - so then I have two separate accounts to log in to which i don't want.  How do I get it to let me use the current account that I have to move my files to?
    Thanks!

    Migration Assistant creates a new account and migrates all the information you have requested to that new account. There is no way around that. However once migrated you can move the data to the account you want to. Here are some instructions for doing so:
    Transferring files from one User Account to another.

  • How to read multiple files of different name using single file adapter

    There are two inbound locations inbound1 and inbound2 , and the files structure present in these two inbound locations are same but the files start with different names example
    (1)files in inbound1 starts with file1,file2...
    (2)files in inbound2 starts with abc1,abc2...
    by using same file adapter with read option how can i read both files....

    Hi K.A.N.N.,
    You can define multiple directories using the above link in 11g and poll for the file as \*.*.
    Alternatively you can use the Synchronous Read and specify the file name at runtime.
    You can also use Pick activity to define multiple branches each with a File Adapter to read from a specified location with specified file name. Although it would contain multiple Adapter Definitions at Development-time, only one of the Adapters will execute at Run-Time.
    Regards,
    Neeraj Sehgal

  • [svn:osmf:] 11242: Updating the Flex project file to take into account the NetStreamContentProtectableTrait 's name change.

    Revision: 11242
    Author:   [email protected]
    Date:     2009-10-28 13:26:52 -0700 (Wed, 28 Oct 2009)
    Log Message:
    Updating the Flex project file to take into account the NetStreamContentProtectableTrait's name change.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/.actionScriptProperties
        osmf/trunk/framework/MediaFramework/.flexLibProperties

    
    Hi,
    This topic seems to be related to VBA coding, better to post your question to the forum for Excel Developer
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Tony Chen
    TechNet Community Support

  • HT201365 Hello Apple, I'm having a problem with activating my iPad 4. I created iCloud account which differs from Apple account but I now forget my iCloud password. How can settle it ? Thank you so much

    Hello Apple, I'm having a problem with activating my iPad 4. I created iCloud account which differs from Apple account but I now forget my iCloud password. How can settle it ? Thank you so much.
    Lydang
    <E-mails Edited by Host>

    Hello Apple, I'm having a problem with activating my iPad 4. I created iCloud account which differs from Apple account but I now forget my iCloud password. How can settle it ? Thank you so much.
    Lydang
    <E-mails Edited by Host>

  • SSIS- Reading Of File Name

    Need to perform below steps while loading data into target table from access database file
    Check if file exists in Folder (particular folder say c:\bin\file...)  
    If file does not exist ... exit
    If file exists  read CSV File for Y/N ( CSV file has value y or n only one column one row)
    If CSV value = Y
    Read the file name, up till "."
    Load access data where entry type = AAA and populate an additional column of source type as the FileName before "."
    If CSV value = N
    Read the file name,up till "."
    Load access data where entry type <> AAA and populate an additional column of source type
    as the FileName before "."
    I can understand how to check the value of csv file for y or n
    How can we check the presence of file, read the name uptill '.' store it in variable and populate it as a column value
    Any help or idea on the above
    aak

    Hi aakcse,
    To check whether accdb file exists in the spepcified directory with wildcard in the file name, you can use the following code:
    public void Main()
    // TODO: Add your code here
    string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::vStrFilePath"].Value.ToString(), "*.csv");
    if (files.Length > 0)
    Dts.Variables["User::vBolFileExist"].Value = true;
    foreach (string file in files)
    Dts.Variables["User::vFileName"].Value = Path.GetFileNameWithoutExtension(file);
    else
    Dts.Variables["User::vBolFileExist"].Value = false;
    MessageBox.Show(Dts.Variables["User::vFileName"].Value.ToString());
    Dts.TaskResult = (int)ScriptResults.Success;
    Note: Assuming there is only one .accdb file in the folder, the script above assigns the file name of the .accdb file without extension to the String type SSIS variable User::vFileName.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • Get the values from Day 1 of the Month

    Hi Friends, I have a requirement in which I have to Get the values from Day 1 of the Month. Ex : If I enter 19 - 07 - 2007.......the report should display Values from 01 - 07 - 2007. How to Code ? Please provide the Code. Thank you.

  • Acrobat X external document linking problem

    Hello, I have been using Acrobat 6 standard for our user manuals for years and have recently started using Acrobat X. It seems that the external document linking has changed though.  I used to put all of our 3rd party literature (PDFs) in a separate

  • HT204406 How do I access greyed out songs on the ipod touch after subscribing to iTunes Match?

    I have just subscribed to iTunes March and now I cannot access my songs on the iPod Touch. The songs can be seen but are greyed out. ANyone know what I need to do?

  • Galaxy S4 free after rebate and trade in? apparently not

    In February there were ads on TV and on Verizon website about Getting S4 free after rebate and trade in. Purchase online for $150 and get $50 rebate and automatically get $100 trade in value on smartphone in working order.(mine was)  I only got the $

  • No inbound interface available in interface determination.

    Hi Guys, I am doing File to web service scenario. I have completed all the steps required in Integration Repository. But in Integration directory while doing interface determination, I am not able to locate my inbound interface. It is showing message