Skip to Content
author's profile photo Former Member
Former Member

Rename the file in application server

Hi Experts,

I want to rename the file which is in Application Server.

E.g:- Current File in Application Server is '\user\sd\file1'

I want to change the above file name to '\user\sd\file1_old' in Application Server.

Please help me if any one aware of this.

Thanks & Regards,

Chandu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Feb 10, 2012 at 09:13 AM

    Hi ,

    You can use class cl_cts_language_file_io and its static method copy_files_local. you can refer this blog [Copying/Renaming a file in Application Server|http://help-abap.zevolving.com/2011/10/copyingrenaming-a-file-in-application-server-2/]. It does not directly renames the file. It creates a copy first with the new file name. Later you have to delete your previous file using delete dataset.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 10, 2012 at 08:58 AM

    Hi,

    Please check these links

    <Link farm removed>

    Regards,

    Ben

    Edited by: Suhas Saha on Feb 10, 2012 2:32 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 10, 2012 at 09:08 AM

    Hello,

    What you want to do is execute a command on the host operating system.

    This can be done with function module SXPG_COMMAND_EXECUTE.

    This module will execute commands that have been predefined in SAP. To see what is available look in SM49.

    If you have the autorizations you can create your own or ask for it to be created.

    More general information can be found [here|http://wiki.sdn.sap.com/wiki/display/ABAP/CreationofExternalCommandswiththehelpofUNIXCodingin+SAP].

    Hope this is helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 10, 2012 at 09:18 AM

    Hi,

    Check the bellow link for your requirement.

    <link farm removed>

    Regards,

    Goutam Kolluru.

    Moderator Message: Please do not spoon feed.

    Edited by: Suhas Saha on Feb 10, 2012 3:01 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.