Finding the file name with Regular Expression

Hello All,
I am having some requirment to find the file name for the input provided parameter.
In my program i am having an input parameter for file name. This contains both the file name and file stored location.
Example : C:\Dokumente und Einstellungen\xs234fs\Desktop\TEST_123_44.txt
From the above example string i need to find only the file name that is TEST_123_44.txt by using Regular expression.
Please let me know how to get this.
Thank you ver much in advance.
Thanks,
Feroz.

Hello,
If you have attached an F4 help to the filename input param, in that you can use the FM: GUI_FILE_SAVE_DIALOG.
In this there is a return param FILENAME which contains the name of the file.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
       EXPORTING
         window_title            = TEXT-001
         default_extension       = p_extens
         default_file_name       = ls_deffile
         initial_directory       = ls_initdet
       IMPORTING
         filename                = ls_filename "This contains the filemame
         path                    = ls_path
         fullpath                = ls_fullpath
         user_action             = ls_usaction.
Else if you have hardcoded the filename in the input field you can use rthe FM: PC_SPLIT_COMPLETE_FILENAME to split the filenames into different components
BR,
Suhas
Edited by: Suhas Saha on Mar 6, 2009 9:31 AM

Similar Messages

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with   - how can I change this?

    I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20  - how can I change this?

    Click on the below link :
    https://get.adobe.com/flashplayer/otherversions/
    Step 1: select Mac OS  X 10.6-`0.`0
    Step 2 : Safari and FIrefox
    Then click on " Download Now"  button.

  • Where do I find the files downloaded with Firefox on my harddrive?

    Where are the downloaded files stored on my hard drive so I can access them?

    You can find the files downloaded with Firefox in '''Downloads''' folder.[Default]
    {for e.g. C:\Documents and Settings\User\My Documents\Downloads }
    OR
    On Downloads window , right click on the file and select '''Open Containing Folder'''.

  • Allow to have the file name with extension in contacts thumbnails

    When I print a contact sheet from the Print module, I would like to have the option to have under each thumbnail the file name complete with the extension; e.g. "Sample.jpg". Right now I can only have the file name, e.g. "Sample".

    I think you are talking about unzipping or extracting the contents
    of the Zip file. Use the API in 'java.util.zip'
    For code refer to
    http://www.javaalmanac.com
    There you would find the code!!
    Good luck!!

  • How to I find the file name of a photo in iPhoto '11?

    I am trying to simply find the actual file name of any photo in iPhoto 2011, so when searching for a specific file in other programs, I can look for it directly. I am fairly new to OS X, and so this might be very easy to others, however I thought I would simply ask.
    I am working with a MacBook Pro, without a retina display, running OS X Lion 10.7.4.
    Thanks!

    I recently had to re-index my harddrive because of a similar reason (search results not populating accurately, even though the files were there) and so I am beginning to wonder. Consider something as easy as adding a photo to my profile here was tough because when searching for the file name I could not locate the appropriate photo. Although I used your suggestion (make a copy on desktop), and then select it directly, it would be much easier to search in the "upload" window, i.e. finder, and then move on.
    Thanks again for your help!

  • Using the regex to match the file name with date time

    Hello all,
    currently I had problem to match the following file name with the date time. Of course I can use this regex like ""(\\\\w+|.+).(zip)" to match it. However in the current application i need to parse the file name and get the current date time to check if it is matched. Does anyone have good idea?
    {code}
    testfile10-08-09-2008-08-21-04-24-0443.zip
    testfile11-08-09-2008-08-22-04-24-0441.zip
    {code}
    thanks in advanced!

    lauehuang wrote:
    Hello all,
    currently I had problem to match the following file name with the date time. Of course I can use this regex like ""(\\\\w+|.+).(zip)" to match it.That regex doesn't make a lot of sense:
    - with "\\\\w" you probably meant "\\w";
    - "\\w+|.+" doesn't make sense: you can simply do ".+" in that case;
    - ".(zip)" will also match the string "%zip" or "Ezip".
    However in the current application i need to parse the file name and get the current date time to check if it is matched. I don't know what you mean by that.

  • While importing, how do I save the file name with the artist in it?

    Currently when Itunes imports any cd, it imports it with the song name only, and put it in a folder with the artist name. I would prefer the tracks to be named 'Artist - Song.mp3'.
    Any idea how I can do this? It's driving me crazy. I need to rename all the imports with the artist on the file name.
    Thank you!
    I have itunes 6

    Anyone have any suggestions for this problem? I have the same issue. I have iTunes for Windows, so Doug's AppleScripts for iTunes is not an option.

  • Find the File name from directory

    Hi Experts,
    My Scenario is:
    Pick the file from the Directory, Based on the file name, get the Q information from R/3 system and place the file into MQ.
    My Question is : How can I get the file name?, any one please guide me..
    Thanks for your help,
    Thanks,
    SR

    HI SR
    You need to enable the Adapter-Specific Message Attributes
    enable the FileName under this. Enabling this will allow to have this parameter as XI header
    You can check this value is generated or not using SXMB_MONI -> Inbound message -> SOAP header  -> Dynamic Configuration.
    This will be captured under http://sap.com/xi/XI/System/File name =  FIleNameu201D
    Now code given by Anand above will allow you to use this FileName in mapping. Based on this you can check R/3 system for relevant file.
    Hope this make you confortable with filename concept
    Thanks
    Gaurav

  • Find the file name of the XML you imported in InDesign

    Once you import an XML using Indesign- is there a way to look up the file name/location of your XML file?
    Thanks!

    As i understand , you mean the name and file location of your saved XML file.
    If yes, than click File > Export > <check the saved file and location>

  • Find the page name with page sid?

    Because my top_page is dislpaying the page id instead of the name of the page
    and the output of the id is something like this
    page_id = 2,11,6_23
    Had any idea on where to find the page name?
    Thank you very much for the help

    Hi thank you for the reply...i have seen the path it was only that page name ...actually i want to e more specified like i is at the "TestPage" in the 2 tab call "test 2" is it possible to get the tab name?

  • How to find the file name

    Hi All,
    How to test the data when a file name is given? for ex: this is file name given to me in which t.code shall i seach this?
    Here is the file name:
    IP30101/0002/420/5835/0129/T/01/420F.2008012113155 (Interface/syncra id/ TLC/ Dataid/ Rec. length/ Format/ Batch id). I assume, 420F somehow related to sales organisation.
    please let me know how to do it.
    Thanks in advance

    Hello,
    Check the TCode AL11
    Cheers,
    Vasanth

  • Where can I find the file name used by a External Table

    I need to run a SQL to retrive the file name that a External Table points to.

    take a look at dba_external_locations

  • Finder abbreviating file names with tilde ~

    At work, one of our macs is abbreviating several file names on our server and using a tilde "~" at the end of the names. It seems to happen randomly, with short or long names, and only on this machine. All the macs have upgraded to SL and his is the only one with these issues. I have tried restarting, taking the com.apple.finder.plst and putting it on the desktop so a restart will replace the file, and repairing permissions. What do I do?

    Still hapining. I Deleted all teh preferences and let it make new ones. It was fine, until about 10 min ago. Now its not only re-naming files (when you copy from the server a file it is displaying as shortened, it will be renamed on the mac) but now it wont let anyone copy to the server on this machine. I can make a new profile and it works fine for a day or two and the same thing happens there too.

  • How do I find the file name of the current desktop picture?

    I've tried going to System Prefs, right-clicking on the desktop, and rifling through the pictures folder to visually match the picture.
    Isn't there an easy way to find out what the name of the current desktop picture file?

    ...and, when I double-clicked on the plist file, it opened OmniOutliner, which did a great job of sorting through all the machine-speak of the file, displaying it in an organized (outline) fashion. I was able to track down the missing picture and replace it on the desktop. Thanks!

Maybe you are looking for

  • Airport doesn't work after firmware update

    Hi. I was using my home wireless network when the Software Update suggested a firmware update to my Airport. I did it, but since then it doesn't work any more. I mean, the Mac can't find it and it keep flashing the yellow light. Have this happened to

  • Quite urgent Ken Burns effect problem

    I am working on a documentary (due tomorrow afternoon). This is a fulll length piece and has hundreds of photographs in it. The trouble is; all the photographs when they where imported automatically got the Ken Burns effect... I want to de-effect the

  • How do you unlock iPhone 5 which has been found by owner

    How do I unlock an iPhone Verizon phone that I thought lost but found it?

  • What is outer request?

    What is outer request and where is it stored? Will the page flow variables be the part of outer qeuest? Please give me a very meaningful reply.Thanks, I appreciate it.

  • Missing disk space - where is it?

    I got a strange problem with my Macbook (late 2007 model). I have a 80GB harddisk in there, okay let's say 75GB useable. My Finder shows me ~12GB free. Now when I click on "Macintosh HD" and look at the size of all folders I get the following: Applic