Getting file name without adding asset

Here's the set up-
I use Watch Folders to compress videos for DVD, and I don't want to add the original files as assets. However, I want part of the watcher to be a script response that creates a text file with the same name as the original file. I haven't been able to pass the file name as a parameter- it keeps passing the MetaData field name. I've tried File Name and Title (I used quotes and brackets- can't show that on here, it makes it into links).
I'm guessing I'm either using the wrong metadata field or this is impossible, because there is no metadata.
Message was edited by: jamesnw

I thought I had a solution for you, but upon testing it I discovered an unfortunate reality with the way FCSvr reports job status.
You can subscribe to jobs and have that subscription feed the values of the job's fields to a script. The jobs don't track elapsed time, but they do stamp time for \[Updated] at the creation of the job, during the job, and at the close of the job.
I tested this by creating one email response that will send me an email with the timestamp value of \[Updated] and a subject line of \[Job ID] \[Status] to tell them apart. I made two subscriptions, one that would fire upon the creation of a job that executes the response, and one that would fire on the modification of a job filtered for a status of "DONE".
The problem is, the \[Updated] timestamp does not ever change in the metadata, it just gets updated in the GUI separately. More digging found the same is true for the \[Progress] field.
You could have had two scripts, one that writes a timestamp to a file at the creation of a job with the first subscription that is filtered for the kind of thing you bill for based on whatever job field values, and another that finds the difference with the end timestamp at the close with the second subscription that is filtered for the kind of thing you bill for based on whatever job field values plus a \[Status] that equals "DONE". There would be a margin of error of a few seconds, but that just means you could round your billing up to the next minute.
But alas, the job metadata never updates beyond the first values. In fact, if you open a job from the queue after it completes, the timestamp reverts to the initial value.
Maybe you could have the script write a timestamp itself when it runs rather than trying to pull one from the job's metadata...

Similar Messages

  • Getting File name without the suffix

    If I have a file name myfile.java
    Is there a function where I can get it to be just myfile without the .java at the end?

    public static String getBaseName (String filename) {
         filename = filename.substring (0, filename.lastIndexOf ("."));
         return filename;
    public static String getBaseName (File file) {
         String filename = file.getName ();
         return getBaseName (filename);

  • Uploaded home movies revert to the original file name when added to iTunes?

    I have Home Video files that I have renamed from the original file names.  When I add these files to iTunes, the files revert to the original file name at the time the file was created.  How can I add these files to iTunes with the new file name without having to rename every Home Movie that has been added?

    OK I have done some more work and think i have the issue resolved. The problem lies with file formats specifically .mp4 and .m4v
    I suspect the files you are importing are mp4 files. When I do this i get the same behaviour of file names changing their name after playback. When i convert my files to m4v format and import the issue disappears.

  • How to get file name of the form attachment?

    Hi,
    is there anybody who is able to help me with the following problem???
    I started my process from Workspace ES and as a first step I attached one locale file (IMG.JPG or IMG.TIF e.g.) as a form attachment. I used "Attachments" bookmark in the Workspace ES.
    I need to get file name of attached file in the process!!!
    I tried to use "getTaskAttachments" component to get file name of form attachment but without success. This component successfully obtained attached file an stored it in the variable (type list, subtype document) but didn't produce all file attribute informations such as basename or Content Type:
    Is there some possibility to obtain file name (including file extension) by using "standard" tools and components of ALC?
    Thanks for your suggestions.

    Hi LekomDev,
    I faced the same situation some time back and this is what I know.
    Based on the file type few of the attributes will or will not be populated. (This is what the official documentation says about Document attributes)
    The file name that you are looking for would mostly be in 'name' attribute of Document object. The 'wsfilename' attribute is the atrribute which gets used to show the file name into Attachments tab of the workspace.
    So, if you are just interested in knowing the filenames then 'name' attribute is the place that you are looking for.
    But if you are trying to solve an issue in which Attachments against a Task isn't showing the filenames properly then you would need to copy the 'name' attribute value into 'wsfilename' attribute and then the Attachmetns against a Task would have the correct names.
    Tip: Use the Record and Playback option of the workbench to inspect the Document variable and you would see all of the values for a Document variable at desired step in your orchestration.
    hope this helps,
    cheers,
    Parth Pandya
    Blog: http://livecyclekarma.wordpress.com

  • GET FILE NAME C:\temp\ADIBO.txt

    Hi,
    How to get file name?
    I used Get_File_NAME, but I'am getting an error.
    lv_lfilename is not the type LOGICAL_FILENAME
    C:\temp\ADIBO.txt
    I need to get  ADIBO ??
    tnh, Adibo..:)
    I am using this code to download file and after that I need to get FILE_NAME:
    DATA:  lv_lfilename TYPE string.
    PARAMETERS:
      pa_lfile TYPE zlocalfile
               DEFAULT 'C:temp'.
        CONCATENATE pa_lfile ''INTO lv_lfilename.
        CALL FUNCTION 'GUI_DOWNLOAD'
             EXPORTING
                  filename = lv_lfilename
                  filetype = 'ASC'
             TABLES
                  data_tab = it_billit_down.
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.

    Hii..
    You have to Maintain the Logical filenames and their Physical Paths in Tcode FILE.
    Then create a program like this..
    REPORT  ZSEL_FILES1.
    DATA : V_LOGFILE TYPE STRING.
    DATA :V_PHYFILE TYPE STRING.
    DATA : ITAB TYPE TABLE OF SCARR.
    START-OF-SELECTION.
    SELECT * FROM SCARR INTO TABLE ITAB.
    **To get the Physical file based on the Logical file names - Maintained in Tcode FILE
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
       CLIENT                        = SY-MANDT
        LOGICAL_FILENAME              = VlOGFILE
      OPERATING_SYSTEM              = SY-OPSYS
      PARAMETER_1                   = ' '
      PARAMETER_2                   = ' '
      PARAMETER_3                   = ' '
      USE_PRESENTATION_SERVER       = ' '
      WITH_FILE_EXTENSION           = ' '
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
    IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
       FILE_NAME                     = V_PHYFILE
    EXCEPTIONS
      FILE_NOT_FOUND                = 1
      OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    **To download the file to PC.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = V_PHYFILE
       FILETYPE                        = 'ASC'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = ITAB
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>reward if helpful</b>

  • How to get file name ?

    i have a code
    fileObject.getName() // it prints D:\myfile.txt
    i dont want D:\ in front of it .
    i can parse this string and throw away the D:\ in front of it ...but i dont want that
    is there any other method in the API which could give me just the file name without directory .
    like
    fileObject.getfileNameOnlyWithoutDirectory() ==>myfile.txt

    Franck_Lefevre wrote:
    Nothing in the OP tells (or leads me to think) that FileObject is inheritiing from File.
    That's why I made this suggestion.Well, I would assume using the name fileObject that it is a file, but as a syntactic point, I would have said
    Is fileObject an instance of File? If not try
    and then made your post. That 's probably just me, but without that it looks (and nearly anyone reading it would see it so) redundant, and so, pointless.
    Like as I said, just as a syntactic point. ;-)

  • Error in reciever file adapter , where i am getting file name dynamically

    hi all,
    error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'

    i am getting new error
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    this is my strcuture
    and i have changed my structure
    <HEADER>
    <ADDRESS1/>
    <ADDRESS2/>
    <ADDRESS3/>
    <ADDRESS4/>
    </HEADER>
    <HEADER_GST>
    <TAX1/>
    <TAX2/>
    <TAX3/>
    </HEADER_GST>
    <LINE>
    <QTY/>
    <UOM/>
    <UNIT_AMT/>
    <CHARGE_TO_DT/>
    </LINE>
    <FILENAME>
         <FILENAME/>
    </FILENAME>
    i have given the recordset structure as
    HEADER,HEADER_GST,LINE,FILE

  • Need to get file name and directory back from file adapter - WRITE

    I am using the file adapter to write a file. I want to log the file name of the file we just created. Since we use a precise timestamp in the file name, I can't accurately guess.
    I have an invoke in my BPEL process to the file adapter. My first try was to assign the jca.file.FileName property to a variable, but it never comes back. I looked around and saw plenty of ways to SET the file name for a write and GET the file name for a read, but no GET file name for WRITE.
    Anyone have a solution?
    Thanks in advance!

    I think I got your point... You can tell FileAdapter the filename to write, but if you don't then FileAdapter can not tell you the filename that it wrote... I think it is pretty possible Oracle didn't implement the latter, as the write operation is probably asynchronous and the filename is calculated later on...
    If what you want is just log, you may achieve your requirement by increasing verbosity on Adapter logs... Have a look at the link bellow...
    http://docs.oracle.com/cd/E15586_01/integration.1111/e10226/ad_mon.htm#CJHHBBID
    Otherwise, the solution for you will be to calculate filename yourself, and that will be a little bit of reinventing the wheel... But at least you will know the filename...
    Cheers,
    Vlad

  • Getting File Name in Automator workflow - combine PDF

    I am using Automator to combine 2 PDF files.
    I would like to inherit one of the file names in the new PDF and append a standard text to the front of the file name.
    I am not sure how to do this. I can combine the PDFs the way I would like, but I am not sure how to plick the file name.
    my workflow is as follows.
    Folder Action targets folder where 1st PDF is added(I want this FILE NAME).
    Ger Specified finder item selects 2nd PDF to be combined.
    Sort Finder Items makes sure the new PDF pages are ordered properly.
    Combine PDF Pages combines the pages.
    Move Finder Items saves the files where i want it.
    Name single item is whre i thought to add my standard text plus the variable of FILE NAME.
    Open File in mail to set up my email.
    Anyone can help with this?
    thanks,
    Aaron

    Here is an automator workflow that does something similar so I believe you can adapt to your needs.  This workflow is setup as a service workflow. It will combine PDFs in the order in which they are selected/clicked via the Shift key.  The default name of the combined output file will be the name of the first file clicked.  Automator can be activated by CTRL clicking any of the selected PDFs.
    1. Service receives PDF files in Finder
    2. Automator Action: Run AppleScript
    on run {input, parameters}
              display dialog "Files will be combined in the order selected via the Shift key" as text
              return input
    end run
    3.. Automator Action: Trim input items
    keep the first one
    you will need to download and install this autotmator action from here:
    http://www.menace-enterprises.com/Files/Automator/Actions/Trim%20Input%20Items.d mg
    4.  Automator Action: Run AppleScript
    (* Note & Definitions
    This Applescript extracts the basename of the first selected file without its .pdf extension
    "path_basename_ext" is full path and name, e.g. User/desktop/file.pdf
    "NmExt" is filename with extension, e.g. file.pdf
    "baseName" is the base filename without extension, e.g. file
    "Ext" is the file's extension, e.g. pdf
    on run {input, parameters}
              set path_basename_ext to input
              tell (info for path_basename_ext) to set {NmExt, Ext} to {name, name extension}
              set baseName to text 1 thru ((get offset of "." & Ext in NmExt) - 1) of NmExt
      baseName
              return baseName
    end run
    5.  Automator Action: Set Value of Variable
    define baseName as the variable
    6.  Automator Action: Get selected finder items
    Options: check ignore input
    7. Automator Action: Combine PDF pages
    choose Combine by appending
    8. Automator Action: Move Finder Items
    choose To: Desktop
    Options: check show this action when workflow runs
    9. Name Single Items
    choose Basename only to: baseName
    Options: check show this action when workflow runs
    10. Open Finder Items

  • Get File name of the inbound file during mapping

    Scenario: to read the file name of the inbound file (which has date required for the mapping) during runtime.
    The requirement is to read the date of the inbound file (passed to the XI pipline by the file adapter) and populate the same in the outbound mapping structure.
    Any idea about how to do this?
    (I went through few options of using java.util.map. not successful yet)

    Hi Anand,
    I posted the same question a time ago, without any help....
    Can I find out the full filename of input file in message mapping?
    Posted: Nov 23, 2004 1:00 PM
    I have in XI 2.0 the following scenario :
    In the inbound fileadapter I read my input file. The filename of the input file is part fixed, part variable (Like INDATA01.txt, INDATA03.txt, etc).
    So in my Adapterconfiguration, I specify the filename with a wildcard (INDATA*.txt).
    What I now want to do, is in my Message Mapping use the full filename , so I can do something different for every filenumber. Is there a way where I can get the full filename available in my message mapping (I did not find the filename in the XML in the message trace).

  • Need to add date/time stamp to file name without time change creating new files

    We have setup our application to save data once a trigger event occurs. We also need the date/time stamp as part of the file name. We used Format Date/Time String and concatenated it into the file name. It all works good, but as the time changes (seconds, minutes, etc.) it causes the Write to File to create a new file with the new filename. Is there a way to create the file and save/latch/buffer the time in the file name so that it doesn't create a new file for every second?
    I've attached a shot of the relevant part of our VI. It's all in a big while loop. The data save is in a case/switch so that when it is triggered it starts saving. (The for loop is to split the data up
    into 4 different files). Like I said, it all works except new files are created every second as the time changes instead of just putting it all in one file with the initial time in the file name.
    Attachments:
    TimeInFileNameQuestion.jpg ‏46 KB

    I need a loop in order to use a shift register. I cannot stop the outer while loop (because it would stop the hardware from collecting data), and I cannot add loops inside which bogs down the processor to where the app stops. I've attached a simpler version of my VI which illustrates the problem. While the button is pressed (the trigger) it should save the data (in this case just cycle numbers) into one file with the initial date/time. But, you can see that it creates 1 file/second. I tried using shift registers, but without adding extra loops I can't see how to do it. Thanks
    Attachments:
    FileNameTest.vi ‏29 KB

  • Getting File Name (Sender File Adapter )

    Hi EveryBody,
    I need to capture only the the FileName in to the outbound xml that is present in the filepath of XI server.
    I checked:
    Adapter Specific Message Attributes:
    Checked box on --> 1)Set Adapter Specific Message Attributes
                                 2) File Name
    And my dt IS OF TYPE :
    <?xml version="1.0" encoding="UTF-8"?>
    <MT_DMS_FINAL>
       <Header>
          <FileName/>
       </Header>
    </MT_DMS_FINAL>
    Now i put the File into the path , i donot need any content of file in XML , only needed the file name.
    i tried above config and it says mapping error, but i test it"s running good with the test tab.
    i guess file picked up by Sender file Adapter is not matching witj the outbound interface ?? is it so ?
    advice. i see in the sxmb_moni that only the content not in xml structure is displayed.
    srini

    Refer to the blog that i asked you to go thru. It has no input fields. It accesses the file name through the Dynamic Configuration. Provides the same as output. Its just a java function without any input parameter. Create an UDF and deleted all the arguments(even "a").
    Code:-
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Oops sorry, i guess i forgot to provide the blog link. Anyway its here:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regadrs,
    Sanjeev.
    Edited by: Sanjeev Shekhar Singh on May 30, 2008 2:12 PM

  • Get file name/path of current .cfm file...

    i am going to make a "tracking" script for a website.  my idea is to add a <CFINCLUDE> to every .cfm file on the server (right at the end, so it would be easier to remove when im done), and have the script that is included add a record to a database that contains the file name/path of the .cfm file.  for example, index.cfm will include trackscript.cfm, and after the index.cfm is processed, a database will have a record in it containing the file name/path for index.cfm.
    i am new to coldfusion, but i think i have everything figured out, except how to get the name of the file that will be added to the database.  is there some kind of function or variable available that will give me the filename of the currently executing .cfm file?

    I don't think sticking a <cfinclude> call into every file is really a very good way of doing this.
    You should have a look at using onRequestEnd() for this sort of thing.
    There are various variables in the CGI scope which one can use to build the originating URL of the current request; CGI.script_name and CGI.query_string are probably the most helpful here.  One can resolve the underlying file system path form a URL using expandPath().
    Adam

  • File-2-Proxy: Get file name in the inbound proxy?

    Hi,
    I need to know the file name in the inbound proxy. After a search I found that's possible mapping the file name to the target structure as it's explained in that link: [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1731350750DB00274596951164745615End?blog=/pub/wlg/2664]
    But I need to know if there is another way to access the file name in the inbound proxy without modifying the mapping.
    Thanks.

    this is possible by a dynamic configuration (there is no other easy way)
    some references -
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1159980350DB00296046510040545862End?blog=/pub/wlg/13704
    the idea is to get the file name in runtime using the dynamic conf code and poulating it to any field that will be part of the proxy message

  • Get File name in script?

    Hi,
    I'm currently running a script using the sqlplus @ command. I'm wondering if there's a way, in my .sql file to know the filename that this file is.... for instance, if i do: sqlplus test/test@mydb @test.sql
    Is there a way, inside test.sql, to know that the file name is test.sql? I know it sounds stupid but it's because I'm logging the script name that was run against a database and I want to ideally be able to rename a script without needing to modify the log insertion command.
    Thanks,
    Goodie

    I do not know of anyway to know the name of the command file.
    You could add a parameter like this
    sqlplus test/test@mydb @test.sql test.sql
    Now the 2nd test.sql becomes &1 in your script and you could have code in your script that says:
    insert into log (process_name, timestamp, ...) values (&1, sysdate,...);
    To bad you can not access the command file as arguement 0 (&0).
    If you are new to parameters try this.
    Create test.sql as
    select '&1' as parm1 from dual;
    sqlplus test/test@mydb @test.sql test.sql
    Documentation:
    http://www.oracle.com/pls/db102/homepage
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357.pdf
    Added URLs

Maybe you are looking for

  • Error in conditional map using User Defined Function

    All, In my mapping I basically have a user defined function that returns the filename of my inbound file from the adapter-specific message attributes (file adapter).  I know this is coded properly because if I simply assign this function to my destin

  • Pdf file merging in Apex 4.0

    Hi guys, is there any way of merging different Pdf files together in Apex 4.0? It seems the BI Publisher can generate PDF files but how about merging them together to form 1 single file? Is it possible with any particular plugin?

  • Unable To View PDF Files From Google Mail

    This is probably a GMail problem, but it's on my iPod Touch so I thought I'd ask. Up until recently, I've been able to view PDF files that have been attached to emails in GMail on my iPod Touch. However lately, I've been getting the following error m

  • Why is it saying fps not in real time?

    Every time i try and put footage in to after effects it lags and sometimes stops and in the top right corner it says fps not real time

  • Customer Direct Debit - Auto Entry in SAP

    Hi, I have a requirement to update the Customer Direct Debits to the bank has to be updated automatically through E-Banking Solutions. Any ideas how this can be achieved with normal Bank statement or Acknowledgements from banks. Thanks and regards Pr