Can i do rename  in system command ?

i need to do backup for log file
how can i do it with sys command   ?
for example for move :
CONCATENATE 'MOVE' FULL_NAME FULL_BACK INTO COMMAND
              SEPARATED BY SPACE.
  CALL 'SYSTEM'  ID 'COMMAND' FIELD COMMAND.
how can i do it for rename  ?
thanks.

Hi dakota,
have a look here: Re: How to move a file from one folder to another using data sets
regaards Andreas

Similar Messages

  • Operating system command in file adaptor

    Hi,
    I am doing file to Idoc scenario, can i use the Operating system command in file adaptor to compress the file at FTP server and decompress the file at IE. I don’t know is it possible and if yes then how or is there any other way to handle the big files as the network speed is very low.
    Any clues!!!!!!!!!!!
    Thanks in advance
    Regards
    Swatantra

    Have a look into these threads - they seem to have the solution u need (i havnt tried it though)
    Unzip file using operating system command in file/ftp receiver adapter
    How to zip and unzip xml files dynamically by XI

  • How System Command can replace a file in Application Server

    Hi Guys,
                  A new system Command is created. When that system command is executed, the client wants to take a file from one directory in application server and put that file into another directory on the application server itself. How this can be achieved?
                 What I know is we can create a function module and place that function module in the system command. But in that function module, I have to change the fielname and put that into another directory. I don't know how to do it.
    Note: I shouldn't read the data from the file using Open Dataset statements..
    Please let me the solution if any one has encountered such a scenario.
    Regards.
    Hari.

    I think you are mixing up things here.
    The program "sapiconv" is for converting files into different codepages, it´s not for copying/moving files to other directories.
    If you want to use the ZSAPICONV to you need to modify it, take out the "sapiconv" and put in the "mv" (move) command to move the file to the other directory.
    I suggest though creating a NEW command. e.g ZMV and give the appropriate parameters.
    Markus

  • Where can I find DBMS system commands

    Hi:
    Where can I find the references about DBMS system commands like dbms_stats.get_table_stats? Thank you very much.
    Maggie

    Hi:
    Where can I find the references about DBMS system commands like dbms_stats.get_table_stats? Thank you very much.
    Maggie See the Oracle 9i Performance Guide and Reference, chapter 3 Optimizer, subsection GENERATING STATISTICS.
    Also, I think the argument is "gather_table_stats" as opposed to "get_table_stats".
    RP.

  • How can I pass system commands from a java program? Urgent!

    hi,
    I have been trying this out since a long time. How do I send system commands to command.com or cmd.exe from a java program and an output of the executed command back to the java application.
    If u have any idea, or have any information about the kind os application reply back.
    Thanks
    Deepa Datar

    This is the code which I tried, but it displays only the title of MS-DOS, something like " Microsoft Corp...etc ". But doesn't take any input, and the subprocess(cmd.exe) hangs.
    import java.io.*;
    public class cmddemo2
    public static void main(String arg[])
    try
    System.out.println("cmd");
    Process p=Runtime.getRuntime().exec("cmd.exe");
    DataInputStream din=new DataInputStream(p.getInputStream());
    DataOutputStream dout=new DataOutputStream(p.getOutputStream());
    System.out.println("after streams");
    String s;
    dout.writeChars("type cmddemo2.java");
    while((s=din.readLine())!="\n")
    System.out.println(s);
    dout.writeChars("dir");
    String s1;
    while((s1=din.readLine())!="\n")
    System.out.println(s1);
    System.out.println("over");
    catch(Exception e)
    { System.out.println("Exception : "+e);

  • Operating  System commands in FTP adapter

    Hi
    I have a requirement to use "Operating System Command" option in the Sender/Receiver side File Adapter.
    And in help.sap.com they have brief notes on this.
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    When I tried to execute some valid DOS commands like MKDIR,RENAME etc it didn't work at all.
    But process has been sucessfully completed without any error!!!
    System : XI 3.0 SP 11
    Can anyone has any inputs on this ? Pls share me some ideas with example. Is there is any limitations on this feature?
    Note: When I tried to give invalid commands hfjkhfkasdjfh,asdjdhas etc, still it is not giving any error!!. Still my File Adapter as well as entire process is successfully completed.

    Hi,
    A couple of cautionary notes.
    The OS command is executed after the file has been processed, e.g. read successfully by a sender adapter or created successfully by a receiver adapter.
    The file name processed can be accessed using %f in the OS command.
    The OS command must include the full directory path, or XI will assume the current directory which may not be where your command resides.
    Regards,
    Bill

  • Operating System Command

    Hi,
    I want to pass UNIX operating system command for outbound FILE adapter. Is it possible to pass two parameters along with the command?
    If yes, could you please send sample syntax?
    Thanks & Regards
    Katta Mohan Reddy

    Hi,
    but why do you want to do it in this way when SAP
    gives a standard way of renaming files?
    Variable Substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    it's available for sp12 but maybe it's worth to wait 1 day until your basis people install sp12 and start testing the new solution ?
    I won't see the sp12 till tuesday so I cannot say if it works but it looks (from the documentation) great
    BTW
    can you turn on the monitoring of the folder the file adapter tries to use and check if any command is being executed at all?
    Regards,
    michal
    Message was edited by: Michal Krawczyk

  • Problem in execution of Operating System Command

    Hi
    I am trying <b>OS command in Reciever File Adapter</b> but the command is not executing.In my scenario i am creating a file by reciever adapter and then this OS command will delete,rename..etc to this file.For this i had created a <b>Batch file</b> in which i had given OS commands, so once this batch file will execute the command should work.File is getting created but OS command is not executing.I am giving the command in the adapter as follows:
    <b>//Server-name/directory/Test.bat</b>
    i had tried giving command like this also
    <b>D:\directory\Test.bat</b>
    but there is no result.i read somewhere that this function works on SP9 or above.We are also working on SP9 but.....
    Do i have to make some settings for this function.
    If you have some solution then please help me.
    Thanx in advance.
    Regards
    Arpit Seth

    Hi,
    In help.sap.com (http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm), it is given as
    When the operating system command is called, the file name currently being processed can be specified with the following placeholders:
    · %f (file name)
    · %F(absolute file name including path)
    Are you using like this?
    rgds,
    Sasi

  • Error Message: "Skype can not start because the system is not available"

    Try to reset all Skype settings. Quit Skype or use Windows Task Manager to kill any Skype.exe process. Go to Windows Start and in the Search/Run box type %appdata% and then press Enter or click the OK button. The Windows File Explorer will pop up. There locate a folder named “Skype”. Rename this folder to something different, e.g. Skype_old. Next go to Windows Start and in the Search/Run box type %temp%\skype and then press Enter or click the OK button. Delete the DbTemp folder. Restart Skype. N.B. If needed, you will still be able to re-establish your call and chat history. All data is still saved in the Skype_old folder. 

    Okay!
    I'm newbie here, but it doesn't matter. I dont want to do here anything else, just write off my opinion about the Microsoft's "new" Skype, and I hope they will read...
    This is a cropped image - of course hungarian, because I'm hungarian, but I think many of us could see this as well. How this is possible? "The Skype can not start because the system is not available" *** What kind of system? The Skype was on a P2P system, where is impossible that the system is not available! This is why the skype was much better than the Microsoft's messenger. Then they bought it, and make it wrong...
    I found a solution for this problem, this can happen if my client is not updated. But IT IS!
    How does it works? Can we use the **bleep** Skype how we would like to use? Or this time we need to find an other application (like Viber), and using that while they not buying that as well, just because that is better?
    Edited to conform with the Community Guidelines
    Subject/title edited to better reflect post content.

  • System commands - disk access

    To emulate the "clrscr" command (from C), I am determining the name of the OS and then passing the appropriate command to the Runtime object:
    if ((menu.osName.lastIndexOf("sun") != -1) || (menu.osName.lastIndexOf("inux") != -1))
      System.out.println("This is an unix terminal");
      menu.clearCommand = "/usr/bin/clear";
    else if (menu.osName.lastIndexOf("indow") != -1)
      System.out.println("This is a Windows MS-DOS terminal");
      menu.clearCommand = "C:\\Windows\\Command\\cls";
    else if (menu.osName.lastIndexOf("dos") != -1)
      System.out.println("This is a MS-DOS terminal");
      menu.clearCommand = "C:\\DOS\\cls";
    try
      menu.cls = Runtime.getRuntime().exec(menu.clearCommand);
      menu.cls.waitFor();
      menu.clsOut = new BufferedReader(new InputStreamReader(menu.cls.getInputStream()));
      while (menu.clsOut.ready())
        System.out.println(menu.clsOut.readLine());
      menu.clsOut.close();
    catch (Exception e)
    -However, I also want to make sure that the system command is not an alias for a malicious script, in terms of invoking any sort of IO (delete/create files, etc.). Is it possible to have some sort of wrapper mechanism around the execution of the system command to detect and catch any attempt to perform IO? So far, my application works as the code speaks out, but I am worried that the system command may not be what I expect.
    Thanks.
    --Ashwin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    What about making the information you need to clear the screen a part of the installation?
    You do
    clear >myclear.out
    cls >myclear.out
    or whatever and use the contents of the "clear screen" file from your Java program.
    Caveat however: under Unix you can have different types of terminal with different clear-screen sequences.
    Sometimes I ponder to make a request for a curses-like java package to give an API for such (more advanced, but still CUI-related) things. Or maybe there is such without my knowing it?

  • Unzip file using operating system command in file/ftp receiver adapter

    Hi,
    I'm wonderdering how to unzip a zip-file in the receiver file/ftp adapter. I know it is possible to do it using the 'Operating system command' feature, but somehow the command I use seems to be ignored! (I'm using SP14, unix).
    The command I entered is quite simple: unzip %F (also tried the %f, but i guess it doesn't really matter wich on I use).
    Is it possible that I'm unzipping to another directory than the one i expect? the unzip should be performed to/in the current directory, and assumingly current directory is the one stated in the 'Target Directory', right?
    Hope someone can clearify this issue for me.
    Best regards,
    Daniel

    Hi Daniel,
    It seems to me also, that the files are being unzipped to a different location than what you are expecting. The OS command might getting executed in some default location(i am trying to fnd that out)on the server and not in the target directory of the channel(It seems logical to me)....
    If you have time...pls try this out & see whether this would help...
    Have a shell script written with the following commands in them
    cd <path to target directory>
    unzip $1(filename from the channel)
    and in the OS command in the Channel give....
    <absolute path to the .sh file> %F
    Thanks,
    Renjith.

  • Operating System Command After File Processing in Sender File Adapter

    Hello guys,
    actually we have different interfaces, and the client to take all the files from only one directory, for example D:/DPI.
    Unitl now we had one adapter for every file with the content conversion, so we didn't have problems with that. Now we have the problem that we sould maintain an order processing files.
    We thougth that an idea could be to execute one file pointing to D:/DPI and at the Operating System Command put like: copy D:/DPI/file.txt D:/DPI/outbound/file.txt, so when file is executed, we move the next file to another directory where is pointing the adapter. Doing this we have an error on the adapter giving us the message: Could not process due to error: java.lang.NullPointerException
    We are using a Windows.
    There is anyway to do in our way, or there is a better solution to resolve this problem?
    Any other idea to do this?
    Many thanks in advance.
    Regards,
    Xavi.

    Helo Guys,
    maybe I haven't explained well.
    We have one directory with different files. We have one adapter for every file( we need for the content conversion ) using NFS and all the adapters are pointing to the same directory.
    The problem is that if we have files A.txt, B.txt and C.txt we need to process in an order.
    And the problem we see is that for every file we have one adapter, so for example if we process file A.txt with one adapter, when this part is finished, we want to process file B.txt with another adapter, and the same for the rest of the files.
    So the idea we had is to create another directories, and when A.txt has finished move file B.txt to another directory.
    However this way is not running, if we log on the PI machine and execute cmd, we can do a copy of one file from one directory to another, but when we put this sentence in the adapter in OS command if we see the adapter log we see an error executing the OS command, but we don't know what is the error, there is no more information.
    There is any way to do this or maybe we have to manage in a different way?
    Many thanks in advance.
    Regards,
    Xavi.

  • Run operating system command for sender File adpter (NFS)

    Hi All,
    iam doing a file to RFC scenario, using 'Run operating system command' in sender file adapter to change the file name while archiving (after processing completed).
    I mention OS command like this:
    sample_server\scripts\Test\Rename.bat"
    Rename.bat file calls a 'perl script' code.
    when i run interface, could see below statement in adapter log ->
    "Execute OS command "
    sample_server\scripts\Test\Rename.bat"
    but the script was not run and file name was not changed.
    Please advice what could be the problem?
    Does this mean script executed successfully?
    Do i need install perl software on XI server, even perl script (.bat file) is executing on sample_server?
    Thanks in advance..
    Regards,
    Rajesh

    Hi,
    Just check the following URL and give it a try again :-
    Executing Unix shell script using Operating System Command in XI
    Hope this info Helps..
    Regards,
    Aditya

  • RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESSING

    hi.
    just i want to know what is the purpose of run operating system command before message processing,after message processing under file sender adapter.
    waiting for your great answer.
    bye.
    regards.
    seeta ram.

    Hello Seeta,
    let me see if I give it using a simple scenario that I implamented : i nedd to transfer a very large file from one server to the other by XI.
    to save space and network traffic I use an OS command before picking up the file to run a zip command to zip the file.
    after I transfer the file to the target server I run another OS command after the transfer to unzip the file.
    now to your second question:
    the before Os command on the target server is used mostly for checks (make sure there isn't a file by that name or backing up existing data)
    and the after sender OS command is usualy for backing up or erasing existing files (cause it is done only after the first part was finished succesfully).
    Uri Lifshitz.
    p.s.
    there was a blog obout this titled "XI as a huge file mover"
    and you can see a description and my scripts at https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/03/additionaltipsforusingXIasahugefiletransfer%28withbatchscripts%29&

  • Executing Operating system commands in ABAP

    Hi
    I want to execute a unix operating system command in an ABAP program. I remember seeing code which executes an operating system command. Could any please let me know about that code?
    Thank You.
    Eswar

    Hi,
    you can try something like this.
    data:cmd(254) type c.
    data: RESULT(255) OCCURS 100 WITH HEADER LINE.
                cmd = 'ls'.
    ** Execute command
      REFRESH RESULT.
      CALL 'SYSTEM' ID 'COMMAND' FIELD CMD
                    ID 'TAB'     FIELD RESULT-*SYS*.
    Kostas

Maybe you are looking for

  • PDF to Word documents not indexed

    I am trying to use the trial version of Acrobat X to convert PDF documents to Word DOC file format.  I have found that the result is not picked up by the Indexing Service in Windows Server 2003.  However, if I convert to an RTF document instead, the

  • My notebook cannot save ac power ; it sudden shut-down when I plug-off . Battery has expired??

    Is there HP center at Puntip Pratunuum ,Bangkok,Thailnd?  I  want to check and repair  my  NB. Thank  you. This question was solved. View Solution.

  • Combining two iDVD burned DVDs on a single DVD (regular or DL)

    Any insight appreciated: Does any one know if it is possible to combine two iDVD burned DVDs (burned with iDVD current in 2002) on a single DVD either single or double layer? 17" Flat Panel 1GHz G4 1 GB RAM 80GB Internal   Mac OS X (10.4.3)   iLife '

  • Where are user alias stored?

    II'm new to the BOE world and I noticed the way the windows ad id is linked to the sap user ID when accessing the portal so users don't need to renter I their user information.  My question is where is that data store within the sap landscape? Is the

  • Copy of Storage bin while creating Material master

    Hi, When I am creating a material master by coping a existing Material Master (which has WM view and Storage bin maintained), system does not copy the same Storage bin to the material which is getting created All the informations are copied except th