The variable $filename and the the *.fm extension

When you need the title of the document importing into a document, you can use the variable <$filename>.
This is useful as you can have a template that changes its name with the name of the file.
However, the variable always writes the document name with the file extension (for example help.fm) making the variable useless.

Gareth,
Please also enter a feature request using the official request route via Bugbase & Wishlist and provide some use cases.

Similar Messages

  • Variable filename and folder in receiver cc

    Dear experts,
    On PI, I need to create a (text-) file with a variable name and folder. The scenario is as follows:
    idoc-> PI -> txt file
    In my incoming Idoc I get the following data:
    - directory where the txt file should be saved;
    - name that the txt file should get.
    How can I realise this in PI? Using variable substitution? As I never done this before, I have a hard time getting this to work...
    Please help.
    Thanks in advance
    William

    Hi,
    Use Dynamic Configuration:
    Input will be 2 variables var1, var2.
    String Name1 = var1;
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key1, Name1);
    String Name2 = var2;
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    conf.put(key2, Name2);
    return "";
    Maping:
    Var1---
    UDF----TargetMessageNode.
    Var2---
    Under ID: Enable ASMA in file receiver adapter and chk FileName and Directory.
    and put * under File name and / underTarget Directory(File receiver).
    NOTE: U can alter this UDF according to ur req.
    Thanks
    Amit

  • Getting Output filename and extension same as the incoming filename and extension

    I need to create a SFTP send port where I should get the output file name and extension same as that of the incoming filename
    I had set the filename in the send port as "%SourceFileName%" but this did not work.
    I have also assigned the input filename (without extension) in a variable in orchestartion. Is there any way i could get the output filename and extension same as that of the incoming message?
    Any help would be much appreciated

    Hi,
    The %SourceFileName% macro maps to the context property BTS.ReceiveFileName that travels with your message in the context. So in order for this macro to work in a send port the message that is going out needs to have this BTS.ReceiveFileName property on
    the context. You probably creating a new message in your orchestration and sending that out. The new message does not have the property on its context which makes it fail. Use a message assignment shape in your orchestration to set the context property for
    the message going out:
    MyMessage(BTS.ReceiveFileName) = OrigMessage(BTS.ReceiveFileName);
    Then %SourceFileName% macro will work at send port.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • How to get only the filename and extension for a text item?

    Suppose there is a non-database text item called :myfilename
    :myfilename := 'C:\SomeFolder\SomePath\myfile.doc';
    I would like to get the file name only without the full path,
    i.e. myfile.doc
    and the file extension, i.e. 'doc', 'bat', 'java', 'xhtml' etc., i.e. the last few chars from the right to the period.
    Any help is welcome.

    Thanks for the hints.
    I defined the non-database Text Item called FULLFILENAME and another two text items called FILE_NAME, FILE_EXTENSION. The following can extract the file extension,
    select substr(:FULLFILENAME,instr(:FULLFILENAME,'.')+1) into :FILE_EXTENSION from dual;
    e.g.
    :FULLFILENAME := 'C:\MyFolder\AnotherFolder\file.doc';
    FILE_EXTENSION becomes 'doc'
    but I would also like to extract only the filename without path into FILE_NAME,
    i.e. file.doc
    Please give more hints. Thanks.

  • How to know the filename and extension of a file in PKCS7  envelope

    Hi! I've a programm that makes a PKCS7 file. I'm enveloping just one file at a time. I want to know if there is a way to know the filename and extension of the file INSIDE de PKCS7 envelope. Because I receive a file that has .p7 extension, but the real document, the one to be decyprted, I don't know its name nor its extension, and I need both for writing it (I will not just invent some name).
    Best regards!

    The construct of the PKCS7 structure you have, is defined in rfc2633. The part defining EncapsulatedContent is introduced in CMS [rfc2639], where no such attribute for a file name is saved in the structure.
    In some occasions, when it is critical, organizations add own object identifier and attibutes to save such descrptivie information as filename and extension.
    A practical approach is, on the signing side, sign the file A.ext to A-ext.p7m resp. A-ext.p7s
    You can not assume a global approach to get back the original filename (if you have no agreement on not the signing peer as above) of the encapsulated data. The reason is, the encapsulated data field is general and it does not neccesarily mean it was a file (a part of a stream or any definite sequence of bytes in general).

  • How to remove the date extensions from a filename in SSIS Flat File Connection Manager dynamically at run time

    Hello,
    I have to load data from a csv file to SQL Database. The file is placed into a directory by another program but the file name being same, has different extensions based on time of the day that it is placed in the directory. Since I know the file name
    ahead of time, so, I want to strip off the date/time extension from the file name so that I can load the file using Flat File Connection Manager. I am trying to use 'variable' and 'expression editor' so that I can specify the file name dynamically. But I
    don't know how to write it correctly. I have a variable 'FileLocation' that holds the folder location where the file will be placed. The file for example:  MyFileName201410231230  (MyFileName always the same, but the date/time will be different)
    Thanks,
    jkrish

    I don't want to use ForEach Loop because the files are placed by a FTP process 3 times a day at a specific time, for ex. at 10 AM, 12 PM and 3 PM. These times are pretty much fixed. The file name is same but the extension will have this day time stamp. I
    have to load each file only once for a particular reason, meaning I don't want to load the ones I already loaded. I am planning on setting up the SSIS process to load at 10:05, 12:05 and 3:05 daily. The files will be piling up in the folder. As it comes,
    I load them. At some point in time, I can remove the old ones so that they won't take up space in the server.  In fact, I don't have to keep the old ones at all since they are saved in a different folder anyways. I can ask the FTP process to
    remove the previous one when the new one arrives. So, at any point in time, there will be one file, but that file will have different extensions every time.
    I am thinking of removing the extensions before I load every time. If the file name is 'MyFileNamexxxxxxx.csv', then I want to change it to 'MyFileName.csv' and load it.
    Thanks,
    jkrish
    You WILL need to use it eventually because you need to iterate over each file.
    Renaming is unnecessary as one way or another you will need to put a processed file away.
    And having the file with the original extension intact will also help you troubleshoot.
    Arthur
    MyBlog
    Twitter

  • I removed the kernal extensions and now Mac won't boot in safe mode

    Hey guys. I did a severly boneheaded thing. In an attempt to see what extensions were necessary I copied them to a folder on my desktop. I then deleted the kernal extensions but did not empty the trash. Upon restart, crunch. I can't seem to get the computer to boot in safe mode. I tried a number of things but none of them have worked. The computer continually crashes into a kernal panic. I am using 10.4 and would like to try and reinstall the OS but I can't even get the computer to boot from the install dvd.
    Any help or insight would be sincerely appreciated. Thanks guys.
    -Boneheadedly yours,
    Sean

    You need to get into single use mode for steps one and two that are listed below.
    This page will tell you how to get into single user mode.
    http://support.apple.com/kb/HT1492
    Basically, you hold down the command + s key then  powering on your machine. The command key has a little apple symbol on the lower left. It is between the alt/option key and the space bar. On a PC keyboard, it will be the windows key, I think.
    You can get into the terminal when you boot off of an install dvd.
    Here is an overview of the terminal commands.  Lets assume that your account has a short user name of mac.
    Macintosh-HD -> Applications -> Utilities -> Terminal
    #What is my short user name?  Type the whoami command.
    mac $ whoami
    mac
    mac $
    #How to list all of your disks.
    # The ls command is for list
    mac $ ls /Volumes/
    Audio CD       Macintosh-HD   Spotless       Tiger-ext
    mac $
      # Let's say your flash drive is named Spotless
    # cd is change directory
    mac $ cd /Volumes/Spotless
    # pwd is Print Working Directory. A directory is the Unix name for a folder.  You are always in a directory.
    mac $ pwd
    /Volumes/Spotless
    mac $
      # The ls command is for list
    # l is long
    # F is type of file where / is directory.  For directories, the slash is pasted to the end of the name. 
    mac $ ls -lF
    total 134704
    -rw-r--r--     1 mac  staff     64560 Mar  3  2009 A-picture-of-Youpi-key.png
    drwxr-xr-x    83 mac  staff      2822 Nov  7 14:52 Applescript files/
    drwxrwxrwx    12 mac  staff       408 Dec 13  2008 Christmas Cards/
    drwxr-xr-x     9 mac  staff       306 Dec 21 17:39 Christmas Cards 2009/
    ... trimmed ... What does all this mean?
    drwxrwxrwx
    d = directory
    r = read
    w = write
    x = executeable program
    drwxrwxrwx
    ||  |  |
    ||  |   all other users not in first two types
    ||  | 
    ||  group
    ||
    |owner

    What type of entry is this? d = directory, - = file, etc. 
    Every Unix resource: files, folders, etc has an owner, group, other 
    A Unix resource has one owner.
    A Unix resource has one group.  A group contains a list of users.
    To gain access to a file, you can be the owner, in the group, or not the owner and not in the group hence you end up as other. The owner, group, or other  has read, write, or execute permissions.
    # l is long
    # a is all to show hidden files & folders
    mac $ ls -lFa
    total 134736
    drwxr-xr-x    41 mac   staff      1496 Dec 22 17:11 .
    drwxrwxrwt     8 root  admin       272 Dec 24 13:55 ..
    -rwxrwxrwx     1 mac   staff     15364 Dec 23 12:52 .DS_Store*
    drwx------     4 mac   staff       136 Jan 22  2009 .Spotlight-V100
    drwxrwxrwt     5 mac   staff       170 Sep 14 16:36 .TemporaryItems
    d-wx-wx-wx     4 mac   staff       136 Dec 31  1969 .Trashes
    -rw-r--r--     1 mac  staff     64560 Mar  3  2009 A-picture-of-Youpi-key.png
    drwxr-xr-x    83 mac   staff      2822 Nov  7 14:52 Applescript files
    drwxrwxrwx    12 mac   staff       408 Dec 13  2008 Christmas Cards
    drwxr-xr-x     9 mac   staff       306 Dec 21 17:39 Christmas Cards 2009
    ... trimmed ...
    # mv is move or rename
    mv -i the-name the-new-name
    # You can just rename the file back to what it was with mv command.
    mv -i old-name new-name
    Here is what these commands mean:
    cd is change directory
    pwd is a print working directory
    ls is list
    sudo is Super user do
    mv is move or rename
    For cryptic comments, you can always uses the manual command which is man. For example:
    man mv 
    # Type the letter q to quit.
    In case you have spaces in your filenames or directories, you need to escape them. See examples: 
    mac $ ls -l ~/"see it"
    -rw-r--r-- 1 mac staff 3171 Oct 26 23:38 /Users/mac/see it
    mac $
    mac $ cd /Users/mac/Desktop/ttt\ html\ copy/
    Do you know about tabbing? Type in a few letters of a name then press the tab key. The computer will type out the rest of the name if it is unique.
    Press the up arrow key to see the previous command(s).
    To edit a command, use the left arrow key to more left and the right arrow key to move right.  Use the delete key to delete the key to the left.  Type a letter to insert.
    history to see many previous commands. 
    mac $ history
        1  pwd
        2  man ls
        3  history
    You may copy then paste from this list.
    http://discussions.apple.com/thread.jspa?threadID=2692161&tstart=0 
    Robert

  • How can I get a filename without the file extension?

    I using a JFileChooser to select and read a file. Now I want to get the filename without the file extension
    JFileChooser j = new JFileChooser;
    String file = j.getSelectedFile.getName();
    At the moment I get this result "file.dat". I need only the filename.....
    Thank you
    Thomas

    It's quite that.
    Here is the code to do that (and the method to get only the extension):
         public String getFileName(String text) {
              int ind = text.lastIndexOf(".");
              if(0<ind && ind<(text.length()-1)) {
                   return text.substring(0, ind);
              return(null);
         public String getFileExtension(String text) {
              int ind = text.lastIndexOf(".");
              if(0<ind && ind<(text.length()-1)) {
                   return text.substring(ind+1).toLowerCase();
              return(null);
         }(I used 0<ind instead of ind>0 because with the code formatting there is a bug with > )
    I hope this helps,
    Denis

  • Why does a downloaded epub file get the flv extension added to the filename?

    I created an ePub file that works fine. I used the Creative Cloud version of inDesign on my MacBook Pro with OS 10.7.
    I emailed to someone to view. The recipient was going to download the ePub to her Mac and sync with her iPad.
    She was using Safari and gmail. She received the email with the attachment. When she clicked download in the email next to the attachment, it downloaded but added the .flv extension to the file.
    With this extension, the file could not be added to the iTunes library. Removing the .flv so that the filename was restored to the original with the .epub extension, all worked just fine.
    I set all .epub files to be opened by Adobe Digital Editions on my computer.
    I replicated the same situation on my Mac with Safari and gmail. Then, I tried with my yahoo email account. Same situation, file downloads but gets .flv extension added. Guess I can't blame gmail.
    Tried with Chrome and file downloaded with correct name, no extra extension.
    Tried with Entourage and file save with .epub, no extra extension.
    Have not yet tried this on a windows machine but will do so in a bit and report back with results.
    How can I prevent the extra extension?
    Thanks,
    Alex

    Just checked this on a Windows 8 laptop.
    Went to gmail. Opened the message and downloaded the ePub file. It downloaded just exactly as expected. No change to the file name.
    I zipped up a folder with the ePub file inside and tried that zip file. I emailed the zip file to my gmail account and then downloaded the zip file and unzipped it. The ePub file came through the process with no alteration to its name.
    As long as I send the ePub inside a zip, I don't seem to have a problem.
    I would still like to know how to prevent the change in name when I email just the ePub file, though.
    Thanks,
    Alex

  • Filename.xls is in a different format than specified by the file extension

    When I create Dimensions and then try to maintain dimension members using the administration client, I receive the following notification from Excel 2007.  The file you are trying to open, filename.xls, is in a different format that specified by the file extension.  Verify that the file is not corrupted and is from a trusted source before opening the file.  Do you want to open the file now?  Yes or No.
    I click yes and the file opens correctly in Excel.  If I click No, I get an "Unspecified error" dialog box from BPC.  I suspect this is a security feature in Excel 2007.  Has anyone else run across this and if so, know of a good way to disable this message?
    Adam

    After upgrading to Excel 2007, you may get the following error when you try to open an excel document.
    The file you are trying to open .xlsx is in a different format than specified by the file extension. verify the file is not corrupted and is from trusted source before opening the file. Do you want to open the file now?
    This errors particularly occurs when youu2019re trying to open an XLS file (Excel 2000-2003) with Excel 2007.
    The easiest way to solve this problem, is to insert the following registry key. This will suppress the notification:
    [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security]
    u201CExtensionHardeningu201D=dword:00000000
    The step-by-step instructions are as follows:
    1.Click Start, click Run, type regedit.exe and press ENTER. This will open your Registry
    2.Navigate to HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY
    3.Right click in the right window and choose New -> DWORD
    4.In the Name field, type u201CExtensionHardeningu201C  (without the quotes)
    5.Verify that the data has the value u201C0u2033
    I advice the steps above to solve the problem, despite the fact that it is quick and dirty.

  • [b]HOW TO:[/b]  Copy and Paste THE Filename AND its PATH from Finder

    HOW TO DO THIS: Copy and Paste THE selected Filename AND its entire PATH from Finder to another application as in document footer reference, or document database which has a path field to aid in locating the file later.
    Finder, Spotlight and File Info (can be used to display Path) or using Command F, command I, etc. but user is not allowed to copy the path to clipboard.
    This is rudimentary, yet the word Path, is unknown to Mac Help.
    Message was edited by: jbov

    AJ,
    Isn't it amazing....There is no Command Key for this action? Apple Care was confounded too. And thanx, it'll be a help....
    Jim
    its tedious, but this should work:
    open a terminal window.
    Drag and drop the icon for the file in the terminal
    window.
    This will put the full path including the filename on
    the command line.
    Copy the path from the command line, and paste
    (wherever).
    Close the terminal window.

  • I have installed Adobe packages and cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?

    I have installed Adobe Creative Cloud for teams CC Packages which says that Acrobat XI Pro is installed. Your support page says it does not install Acrobat and I have to look in the Extensions folder for an MSI file.  I have run a number of searches and  cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?
    Also I now administer the teams and have accepted the invitation to I received to be a team member and download the apps.  The admin page shows that I have been sent an invitation but does not show my account as "ACtive" unlike my other team members.  I tried to use the link in the invite to accept it become active but the link displayed an error saying I had already accepted the invite... why is no account not active?
    Finally what other product downloads in Creative Cloud do not actually download as part of the Creative cloud Packager for downloading the apps? e.g. acrobat and what else?

    My apologies Eadeszoo I believe our support agents are unavailable on January 1.
    Are you able to copy the contents of the DVD to your computer?  Are you receiving any particular error messages when you are trying to install?  Finally which operating system are you using?

  • The filtering process could not be initialized when trying to process this item. Verify that the file extension is a known type and the item is not corrupt

    I am getting below error message while search crawl in sharepoint foundation 2010 search for only .VSD files and not for any other docs type.
    The filtering process could not be initialized when trying to process this item. Verify that the file extension is a known type and the item is not corrupt. 
    I have installed the Microsoft Filter Pack 2.0 in search server but still i am getting the same error.
    <//span>
    Any one's help will be appreciated.
    Regards,
    Rashmi
    Rashmi Singhal

    Hi Rashmi,
    1. Checked the file extension is added or not to the search file types.
    2. Checked file name has any invalid characters.
    3. Resetting the crawl index and run a full crawl .
    Best Regards.
    Kelly Chen
    TechNet Community Support

  • IMac G5 (2004) logic board and the repair extension program

    Hi,
    I know that there are tons of topics about logic board/power supply troubles witht the first generation G5s, and I'm sorry to start yet another new thread, but I still have some questions about this issue.
    I have a first generation iMac G5. Long story short...when I first got it the computer would shut itself off sometimes after I had put it to sleep. When I would try to restart nothing would happen, but usually letting it sit unplugged a while would solve the problem (occasionally when I'd restart a different start up noise would sound and the white light would flash quickly). It happened so randomly, that I just lived with it, blaming the problem on my dorm network, or a power failure. A few days ago I tried to start the computer up and nothing happened (just a VERY faint sound like a clicking or ticking or intermitant humming...definatly electrical sounding). I unplugged it overnight, but the next day still nothing. I decided to go through the troubleshooting steps Apple lists online. The internal power button could not start it up and the second LED does not flash, which according to Apple means the logic board needs replacing. Luckily my serial # is covered by the Repair Extension Program, and I'm bringing my computer in tomorrow morning to be fixed (just in time for back to school).
    I have become concerned, while browsing the discussion topics, that this fix may not be permenant. I've read a few posts that claim that they are on their third Logic Boards, and this kind of scares me. My parents bought me the computer (our family's first ever Mac) and did not purchase the AppleCare extended warranty (they had heard how reliable Macs were...hmmm.) I didn't even know that I could purchase AppleCare after-the-fact until it was several months after my 1yr warranty expired. I do appreciate the fact that Apple recognized what seems to be a common problem with this generation of iMacs, but I wonder why they did not contact the owners of these machines to let them know that the problem and repair extension even existed.
    So I guess my real question is...Does anyone know if, after this repair Apple will replace the logic board if it dies again? Is there a limit to the number of qualified repairs you can get through this Repair Extension program? Also is there any other Extended warranty type thing I can purchase after my 1yr. warranty is up.
    Sorry the post is so long...I'm just scared about the fate of my beloved Mac.
    iMac G5 (2004)   Mac OS X (10.3.9)  

    Oh man, am I actually relieved reading this thread. Just took my baby (iMac G5 first generation) in for repairs today, not knowing what was wrong with it. Luckily my serial numbers are in the range, so I'm crossing my fingers that they're going to cover this.
    Brief synopsis of what happened, in case it differs from anyone else's
    About a month ago, my iMac started to not wake up from sleep mode. Instead of waking up, it would just shut itself off. This continued for about 2 months, with me thinking nothing of it. Then, instead of shutting itself off, the computer would restart when I attempted to put it to sleep.
    Then, last night, I was surfing the net and all of a sudden the power just failed. No noise, no "grey screen", we're talking like a millisecond later the screen was black. I treid unplugging the machine and then plugging it back in while simultaneously holding the power button to reset the PSU and still nothing. At that point it was about 1:30 in the morning, so I just went to bed not wanting to deal with it until the next day. By the time I woke up, there was a distinct smell of electrical components burning (in grade 8 shop class we used to hook up resistors to the voltage generator and crank the juice up until they fried when teach wasn't around, so I distinctly remembered the acrid stench :P)
    I opened the back up and did the LED check, and #2 wouldn't even blink. So I took it in and they said they'd have to get back to me and that's where I stand now.
    The thing that concerns me is that if some of the components fried that there may be possible damage to the motherboard etc. Luckily I'm not too worried about the hard drive because it did still boot up and all. People that have experience with this, what usually happens with files on your HD after a logic board replacement? Are they usually fine?
    The other thing that concerns me is that apple has made no effort to contact me, and it will be 2 years after the purchasing date come November 1, 2006. I'm lucky that I caught this now before it was too late.

  • Framemaker uses $filename for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen?

    Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.

    See: System Variables

Maybe you are looking for