File creation using OS command

Hi all,
I am working on a scenerio wherein receiver is a flat file.At output i need 2 files to be created:
file one has the actuall payload and second file should contain the name of first file.
This second file needs to be created with a OS command(after message processing) in file adapter(FTP), Please tell me wat should the command be, so that a file is created in the same location as file1 with the name of file1.
I tried "echo %f >> filename.txt" but no file was created.Please help.
Thankyou.
Edited by: shruthi .. on Jun 2, 2008 7:54 AM

HI,
You need to write Shell script for this kind of requirement,
There is a split command available
SPLIT -- Split a file into fixed-size pieces
Refer below pdf for reference commands
http://www.maths.dundee.ac.uk/software/OSXcommands.pdf
Thanks
Swarup

Similar Messages

  • Opening my Photoshop Elements 11 does not work. I always get following message: "Could not open a volume of work, because the file is locked or you do not have the required permissions. Undo the protection of the file on using the command 'Properties' in

    Opening my Photoshop Elements 11 does not work. I always get following message: "Could not open a volume of work, because the file is locked or you do not have the required permissions. Undo the protection of the file on using the command 'Properties' in Windows Explorer." What is wrong? I cannot unterstand what I have to do!

    Could not open a scratch file because the file is locked or you do not have the necessary access privileges. (…) | Mylen…
    Mylenium

  • Log file creation using km api

    Hi,
    how to create log file using km api . please provide me if any sample code available.
    Thanks and Regards,
    Nari.

    Thanks for your quick reply but one more requirement is... here i can able create text file in km and adding content to created text file on the same line but i want to update new content in next line(newline).Please see below code and correct it.
         Date dt = new Date(Calendar.getInstance().getTimeInMillis());
                                  com.sapportals.portal.security.usermanagement.IUser iuser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
                                  IResourceContext irCtx = new ResourceContext(iuser);
                                  RID docsResource = RID.getRID(filepath);
                                  IContent initCont = new Content(new ByteArrayInputStream("".getBytes()),"text/plain",-1,null);
                                  if(ResourceFactory.getInstance().getResource(RID.getRID(filepath+"/"+filename), irCtx) == null)
                                       ICollection docsColl = (ICollection)com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(docsResource,irCtx);
                                       docsColl.createResource(filename,null,initCont);
                              String InputData = Exception;
                              RID sugg_html = RID.getRID(filepath+"/"+filename);
                              IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(sugg_html,irCtx);
                              String existingComments;
                              IContent cont = resource.getContent();
                              BufferedReader buf_in = new BufferedReader(new InputStreamReader(cont.getInputStream()));
                              existingComments = buf_in.readLine();
                              existingComments = existingComments+"   "+"\n"+dt+InputData;
                              ByteArrayInputStream inputStream = new ByteArrayInputStream(existingComments.getBytes());
                              cont = new Content(inputStream,"text/plain",-1,null);
                              resource.updateContent(cont);
                              cont.close();

  • PDF file creation using backend package

    How to create a PDF file using Oracle 10G Backend Package?

    Write something like this to a file and you have your PDF created from the database:
    %PDF-1.3
    1 0 obj
    <</CreationDate (D:20101018093136)/Creator (AS-PDF 0.2.0 by Anton Scheffer)/Producer (running on Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product)>>
    endobj
    2 0 obj
    <</Type/Font/Subtype/Type1/BaseFont/Helvetica/Encoding/WinAnsiEncoding>>
    endobj
    3 0 obj
    <</ProcSet [/PDF /Text]
    /Font
      <<
        /F1 2 0 R
      >>
    >>
    endobj
    4 0 obj
    <</Type/Pages/Kids [
    6 0 R
    /Count 1
    /MediaBox [0 0 595 842]
    >>
    endobj
    5 0 obj
    <<
    /Length 86 >>
    stream
    BT /F1 12 Tf ET
    BT 28.35 744.85 Td (Some text written from database backend.) Tj ET
    endstream
    endobj
    6 0 obj
    << /Type /Page
    /Parent 4 0 R
    /Contents 5 0 R
    /Resources 3 0 R
    >>
    endobj
    7 0 obj
    <</Type/Catalog/Pages 4 0 R/OpenAction [0 /XYZ null null 1]>>
    endobj
    xref
    0 8
    0000000000 65535 f
    0000000010 00000 n
    0000000193 00000 n
    0000000284 00000 n
    0000000364 00000 n
    0000000452 00000 n
    0000000593 00000 n
    0000000680 00000 n
    trailer
    << /Root 7 0 R
    /Size 8
    >>
    startxref
    760
    %%EOFAnton
    P.S. div class="jive-quote" div class="jive-quote" /div /div should be read as >> The forum software messes things up
    And no, I don't write this PDF-stuff with a text editor, I have written a small package (less than 1000 lines) which does that for me.
    Something like PL_FPDP, http://www.erasme.org/PL-FPDF,1337
    Edited by: ascheffer on Oct 18, 2010 11:41 AM

  • File renaming in Sender file adapter usins OS command

    Hi Guys ,
    Can anyone explain on how to use the rename command in Sender file adapter using OS command parameter.
    Thanks,
    KC.

    Hey
    run the following OS command
    mv <originalFileName> <newFileName>
    This command will copy the <originalFileName> to a new file called <newFileName> and will delete the <originalFileName>
    There is no rename command in Unix,mv is used to rename the files
    Thanx
    Aamir

  • CSV File Creation

    I have 2 queries related to CSV file creation using ODI.
    1) I need to generate CSV file out of data contained in Oracle DB Table. When the data gets extracted into CSV file, it needs to be sorted on one particular column ( e.g Account_Number). Is this possible?
    2) When the data gets extracted in CSV format, the DATE is shown as ' 2008-06-06 00:00:00.0' . How can I get the date to be stored in just 'DDDD-MM-YY' format?
    Thanks
    KS

    check out the OdiUnloadSql component. I have used it to create a csv file, but have not gone into date format and sorting detail. you might have to look into that.

  • Avoiding empty-file creation

    Hi,
    Is there any way to avoid empty file creation on the receiver side? I am using variable-substituton for file naming.
    Thanks,
    Vishal

    Vishal,
    Once I faced a similar issue, a 0kb file though empty file creation "ignore" option was creating empty files.
    Try to avoid empty files creation using
    1. Receiver determination where you can check for required field, and generate target only if it appears
    1. Message mapping by not generating a target structure
    Again, it depends on your requirement on when these empty messages are getting created...
    Can you tell us, on what cases is this empty file is getting created?
    Venkat.

  • Using javac command

    I have created desktop gui application and I see several files created. I want to compile from the using the javac command. But I do not know which of the files I should compile first. When I build from the IDE, I get no errors. I tried compiling all of these files separartely using javac command and I got many errors.
    myJavaFileView.java
    myJavaFileApp.java
    myJavaFile.java

    Suppose you want to use these three classes.
    There are two possibilities:
    1. Three separate files called myJavaFile.java,myJavaFileView.java and myJavaFileApp.java. With older Java compilers, it may be necessary to compile the file myJavaFile.java first, with
    javac myJavaFile.java
    so that the class file myJavaFile.class is found when compiling later the file myJavaFileView.java and myJavaFileApp.java. On newer compilers, this should happen automatically when compiling myJavaFileApp.java and myJavaFileView.java.
    2. Put both classes into one file. Note that then only one of these classes may have the public modifier in front of it, as in
    public class myJavaFile
    which then has to agree with the filename (that is, the file must be called myJavaFile.java).

  • How to generate "CertificateSigningRequest" by using shell command

    Hi,
    I want to create "CertificateSigningRequest" file by using shell command
    We can create this csr file by using keychain.
    Keychain Access/Certificate Assistant/Request a certification from a Certificate Authroity
    I really need your help.
    Thanks
    Meng

    Hi,
    Thanks for your message.
    Yes, it is self-signed Certificate Authrity.
    If it is very easy and free, please let me know.
    Thanks
    Meng

  • Appending a creation date/time stamp to a filename using MS Command Language

    I need to access the creation date and time of an existing file and then append that date/time to the filename using MS command language in a .bat file.  The code executes on a Windows server.   I'm looking at different options for doing
    this.  I know it can be done using MS Powershell scripting.  Any other suggestions appreciated.  Thanks

    I tested the answer you supplied here:
    http://social.technet.microsoft.com/Forums/en-US/38873a13-f3f2-40f2-bb96-c1c63722caab/adding-a-datetime-stamp-to-a-file-using-ms-command-language?forum=winserverpowershell
    and it worked.
    Richard Mueller - MVP Directory Services

  • Not able to extract performance data from .ETL file using xperf commands. getting error "Events were lost in this trace. Data may be unreliable ..."

    Not able to extract  performance data from .ETL file using xperf commands.
    Xperf Commands:
    xperf –i C:\TempFolder\Test.etl -o C:\TempFolder\BootData.csv  –a process
    Getting following error after executing above command:
    "33288636 Events were lost
    in this trace. 
    Data may be unreliable
    This is usually caused
    by insufficient disk bandwidth for ETW lo
    gging.
    Please try increasing the minimum
    and maximum number of buffers
    and/or
                    the buffer size. 
    Doubling these values would be a good first at
    tempt.
    Please note, though, that
    this action increases the amount of me
    mory
                    reserved
    for ETW buffers, increasing memory pressure on your sce
    nario.
    See "xperf -help start"
    for the associated command line options."
    I changed page size file but its does not work for me.
    Any one have idea, how to solve this problem and extract ETL file data.

    I want to mention one point here. I have total 4 machines out of these 3 machines above
    commands working properly. Only one machine has this problem.<o:p></o:p>
    Hi,
    I consider that you can try to use xperf to collect the trace etl file and see if it can be extracted on this computer:
    Refer to following articles:
    start
    http://msdn.microsoft.com/en-us/library/windows/hardware/hh162977.aspx
    Using Xperf to take a Trace (updated)
    http://blogs.msdn.com/b/pigscanfly/archive/2008/02/16/using-xperf-to-take-a-trace.aspx
    Kate Li
    TechNet Community Support

  • ERROR MESSAGE WHEN USING PACK COMMAND   Missing file ////presenter.css   Also:  "This course requires JavaScript to be enabled in your browser. Please enable JavaScript, then relaunch the course."  I have Java enabled in all browsers

    ERROR MESSAGE WHEN USING PACK COMMAND   Missing file ////presenter.css    Command then fails
    Also:  "This course requires JavaScript to be enabled in your browser. Please enable JavaScript, then relaunch the course."  I have Java enabled in all browsers
    Thoughts?  Using Presenter 10  Win 8.1  Intel I7  new HP with plenty of memory
                   Thanks

    I had saved one copy as an .asp but then resaved it to .xhtml 
    I'm assuming this is a static web site.  Rename (F2) all your pages with .html or .htm extension. 
    .xhtml is not a valid extension.
    Nancy O.

  • RC-50004: Fatal: Error occurred in ApplyDatabase:  Control file creation failed  Cannot execute configure of database using RapidClone

    dear associates,
    linux version: red hat enterprise  linux 4.0.
    EBS version: 12.1.1
    RC-50004: Fatal: Error occurred in ApplyDatabase:
    Control file creation failed
    Cannot execute configure of database using RapidClone
    RW-50010: Error: - script has returned an error:   1
    RW-50004: Error code received when running external process.  Check log file for details.
    Running Database Install Driver for VIS instance

    dear associates,
    can u please assist me how can over come this error or problem.
    linux version: red hat enterprise  linux 4.0.
    EBS version: 12.1.1
    RC-50004: Fatal: Error occurred in ApplyDatabase:
    Control file creation failed
    Cannot execute configure of database using RapidClone
    RW-50010: Error: - script has returned an error:   1
    RW-50004: Error code received when running external process.  Check log file for details.
    Running Database Install Driver for VIS instance

  • Using a Logical File (FILE) in an External Command (SM69)

    I have an external command defined in SM69 that runs a script on the application server. The command is called from within an ABAP program with SXPG_CALL_SYSTEM. It currently works as it should.
    The issue is that the external command is defined as:
    sh /absolute/path/to/script/file
    I have been told to instead set up a logical file in FILE so that the command would be:
    sh <MY_SCRIPT_LOGICAL_NAME>
    I've gone into FILE and defined MY_SCRIPT_LOGICAL_NAME as:
    Logical File = MY_SCRIPT_LOGICAL_NAME
    Name = Descriptive Text
    Physical File = <SYSID>actualname.scr
    Data Format = ASC
    App Area = HR
    Logical Path = SCRIPT_PATH
    where SCRIPT_PATH is also defined in FILE with the physical path of:
    /iface/<SYSID>/outboundhr/scripts/<FILENAME>
    So when I try executing the command with SM49 as defined as:
    sh <MY_SCRIPT_LOGICAL_NAME>
    I just get Exception raised: OTHERS
    If I define the command as:
    ls <MY_SCRIPT_LOGICAL_NAME>
    I get the same thing, Exception raised: OTHERS
    I'm guessing that the logical file name isn't getting translated. Does anyone know if it should in this instance? Is anyone using a logical file as part of an external command?
    Thanks much.

    I think you must use FM FILE_GET_NAME to translate the logical file name to a physical one before executing the command.
    Like:
    DATA: physical_file_name(60),
          my_script_logical_name(60) VALUE 'CLASSIFICATION',
          format(3).
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
        logical_filename = my_script_logical_name
      IMPORTING
        file_format      = format
        file_name        = physical_file_name
      EXCEPTIONS
        file_not_found   = 1
        OTHERS           = 2.
    Rob
    Message was edited by: Rob Burbank

  • Using UNIX command to copy desktop files/folders

    Hello All. I need help using UNIX command(s) to copy text documents and or folders from my lab computers to my desktop at home. Since I have such a slow connection, I think this will work best. I need help with the cp command and the path mostly. Since all files would be in folders on the desktop (including documents (that "missed" the folders), I believe I could simply copy desktop contents? Thanks, J Langlois

    What you want to do is SCP (secure copy) your documents to your remote host.
    send this command to the computer with the documents
    scp ~/Desktop/FILEOR_FOLDERNAME USERNAME@REMOTE_COMPUTER:~/Desktop/
    Replace all the stuff in UPPERCASE with the correct vales for your situation.
    Mini (Intel Core Duo)   Mac OS X (10.4.8)  

Maybe you are looking for