How to delete file from Window server

Hi
Can anybody tell me that Is there any function module for deleting file from presentation server like C directory.
Quick suggestion will highly be appreciated!!!!!!!

Try this:
CALL METHOD cl_gui_frontend_services=>file_delete
  EXPORTING
    filename             =
  changing
    rc                   =
EXCEPTIONS
   FILE_DELETE_FAILED   = 1
   CNTL_ERROR           = 2
   ERROR_NO_GUI         = 3
   FILE_NOT_FOUND       = 4
   ACCESS_DENIED        = 5
   UNKNOWN_ERROR        = 6
   NOT_SUPPORTED_BY_GUI = 7
   WRONG_PARAMETER      = 8
   others               = 9
this is pretty gud approach .
Message was edited by:
        Nishant Rustagi

Similar Messages

  • HOw to delete files from remote server?

    Hi,
    I want to delete files from a directory on remote server.
    I use the following command to delete on current server:
    find $srcdir -mtime +90 -name "COR*.txt" -exec rm -f {} \;
    Now, how can I delete files from remote server ?
    Thanks!
    Yogini

    Some possible options:
    1. There exists SSH implementation for Windows.
    2. You can make a workaround. You can setup share for specific/wanted directory.
    Then you can mount it on Linux machine and execute command localy and delete files "localy" in mounted directory.
    3. You can setup FTP server on Windows machine and do that remotely via FTP commands.

  • How to delete file from application server(Unix)

    Hi All,
    Using the below code downloading a file from application server(Unix) to client machine. I want to delete the file from application server once it is downloaded to client
    We work on Forms 11.1.1.4.0 and Oracle DB 10g. Client machine are Windows 7.
    BEGIN
      IF webutil_file_transfer.AS_to_Client
      (clientFile => Name_In('global.g_file_name')
      ,serverFile => ls_AppServer_Loc)THEN
      message('Data exported Successfully');
      ELSE
       message('File download from Application Server failed');
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
      message('File download failed: '||SUBSTR(sqlerrm,1,200));
      END;
    I have search for solution on OTN. Few suggested to use HOST.
    Can any one help me how to use Host() built_in to delete the file.
    Thanks,
    Maddy

    Can any one help me how to use Host() built_in to delete the file.
    Host('/bin/rm <complete file path>');

  • How to delete files from application server posted in last 30 days

    I have some files in application server posted through ABAP program with the below format
    \.\.\.abcd_20110209_111209.csv   (with  date and time). I need to delete those files which was posted in last 30 days through another program. Could you plaese help me to achieve the requirement?

    There are many ways you can delete/archive files in application servers.
    1. Depending on the application server, usually administrators setup delete/archive programs. For e.g. if the application server is a UNIX, then the unix admin will write a script to delete/move older files. - this is the most common approach I've seen.
    If you have to achieve this through ABAP then,
    1. You can get the script from the server admin and then use that script to create an external system command through SM69/49 and use the function module SXPG_COMMAND_EXECUTE to execute it.
    2. You can also look at FM EPS_DELETE_FILE and see if it fits the bill for you.
    There are many other possibilities too and each one has its own pros/cons. So you'll have to choose the right one for your requirement.

  • Deleting file from application server

    can any one tell me how to delete file from application server?

    Hi,
      Use statement
      delete dataset 'tmpfile.txt'.
    \tmp\file.txt is the file path on application server which you want to delete.
    Regards
    Sailaja.

  • Who has deleted data from Windows Server

    Hi supporters, 
    Somebody has deleted some files from windows server's physical drive from windows XP user machine. This allegation has been made by IT team to a very sincere employee of the company who is working from last 15 years with the firm. So, can you please help
    me to know that how we can find the right & legal way to know who has deleted the data actually because there are personal clash between IT team and accused person (who is very much trustworthy).
    Thus, please help me immediately and confirm me (on following mobile number) that if you could arrange an IT professional to sort out this issue as soon as possible.
    Thank you,
    With best regards, 
    Mukesh Kapoor (09810030276)

    This one may help.
    Apply or Modify Auditing Policy Settings for a Local File or Folder
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Process Chain - Delete File from Application Server

    Hi Gurus,
    Im working with Process chain, and i have a load from a flat file, so my question is :
    How can i delete that file from the application server after was loaded ?
    THANKS IN ADVANCED !!! I REALLY APRECCIATE YOUR HELP.
    Marcos

    hi,
    I have gone through the forum you have posted for deleting files from application server through process chain.
    I have similar reuirement in my project.
    Can you please provide me the solution?
    Your inputs will be highly appreciated.
    Thanks in advance.
    Regards,
    Lavanya.

  • T-code for delete file from application server

    Hi all!
    Please, has any t-code for delete file from application server? For upload exist CG3Z, for download has CG3Y. And for delete? Has anyone?
    I need to delete file from application server in QA system and i don't want to create a program for this because i will need to transport a request from DEV to QA.

    I don't have contact with basis team.
    The FM EPS_DELETE_FILE support directory name with max 60 char. My dir. has more than that. I need a transaction for this.
    Anybody know if this transaction exist?

  • HOW TO DELETE FILES FROM ADOBE READER IF THEY ARE UNNECESSARY

    HOW TO DELETE FILES FROM ADOBE READER IF THEY ARE UNNECESSARY

    Hi,
    You might need to sign up at https://cloud.acrobat.com/ and choose 'Files' tab where you can find all the files.
    Select all the files you want to remove and choose 'Delete' option.
    Regards,
    Anubha

  • How to delete file on ftp server

    hello,how to delete file on ftp server?thank you!

    I was trying to hint to the fact that you gave no where near enough information.
    Have you already written anything? Such as software that will connect to an FTP server?
    Are you using a 3rd party package?
    Are you doing it by hand, using sockets?

  • How to download file from application server

    Hi Experts,
                  I developed report and execute in background mode. for this i used Open dataset transfer and close dataset . i got the requried output . But in this case user want downloaded file on presentation server so can anyone tell me How to download file from application server?
    i know it is possible through Tcode CG3Y. but i want code in program.

    This code will download a file to your Client package by package, so it will also work for huge files.
    *& Report  ZBI_DOWNLOAD_APPSERVER_FILE
    REPORT  zbi_download_appserver_file.
    PARAMETERS: lv_as_fn TYPE sapb-sappfad
    DEFAULT '/usr/sap/WBP/DVEBMGS00/work/ZBSPL_R01.CSV'.
    PARAMETERS: lv_cl_fn TYPE string
    DEFAULT 'C:\Users\atsvioli\Desktop\Budget Backups\ZBSPL_R01.CSV'.
    START-OF-SELECTION.
      CONSTANTS blocksize TYPE i VALUE 524287.
      CONSTANTS packagesize TYPE i VALUE 8.
      TYPES ty_datablock(blocksize) TYPE x.
      DATA lv_fil TYPE epsf-epsfilnam.
      DATA lv_dir TYPE epsf-epsdirnam.
      DATA ls_data TYPE ty_datablock.
      DATA lt_data TYPE STANDARD TABLE OF ty_datablock.
      DATA lv_block_len TYPE i.
      DATA lv_package_len TYPE i.
      DATA lv_subrc TYPE sy-subrc.
      DATA lv_msgv1 LIKE sy-msgv1.
      DATA lv_processed_so_far TYPE p.
      DATA lv_append TYPE c.
      DATA lv_status TYPE string.
      DATA lv_filesize TYPE p.
      DATA lv_percent TYPE i.
      "Determine size
      SPLIT lv_as_fn AT '/' INTO lv_dir lv_fil.
      CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
        EXPORTING
          file_name      = lv_fil
          dir_name       = lv_dir
        IMPORTING
          file_size_long = lv_filesize.
      "Open the file on application server
      OPEN DATASET lv_as_fn FOR INPUT IN BINARY MODE MESSAGE lv_msgv1.
      IF sy-subrc <> 0.
        MESSAGE e048(cms) WITH lv_as_fn lv_msgv1 RAISING file_read_error.
        EXIT.
      ENDIF.
      lv_processed_so_far = 0.
      DO.
        REFRESH lt_data.
        lv_package_len = 0.
        DO packagesize TIMES.
          CLEAR ls_data.
          CLEAR lv_block_len.
          READ DATASET lv_as_fn INTO ls_data MAXIMUM LENGTH blocksize LENGTH lv_block_len.
          lv_subrc = sy-subrc.
          IF lv_block_len > 0.
            lv_package_len = lv_package_len + lv_block_len.
            APPEND ls_data TO lt_data.
          ENDIF.
          "End of file
          IF lv_subrc <> 0.
            EXIT.
          ENDIF.
        ENDDO.
        IF lv_package_len > 0.
          "Put file to client
          IF lv_processed_so_far = 0.
            lv_append = ' '.
          ELSE.
            lv_append = 'X'.
          ENDIF.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize         = lv_package_len
              filename             = lv_cl_fn
              filetype             = 'BIN'
              append               = lv_append
              show_transfer_status = abap_false
            TABLES
              data_tab             = lt_data.
          lv_processed_so_far = lv_processed_so_far + lv_package_len.
          "Status display
          lv_percent = lv_processed_so_far * 100 / lv_filesize.
          lv_status = |{ lv_percent }% - { lv_processed_so_far } bytes downloaded of { lv_filesize }|.
          CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
            EXPORTING          "percentage = lv_percent - will make it fash
              text = lv_status.
        ENDIF.
        "End of file
        IF lv_subrc <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      "Close the file on application server
      CLOSE DATASET lv_as_fn.

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • How to transfer files from windows 7 to macbook pro

    how to transfer files from windows 7 pc to my new macbookpro

    You can use your external hard drive that is used to backup your important data to transfer the data from your PC to your Mac.
    If your Windows 7 PC is a laptop and you live near an Apple store, make an appointment at the Genius bar where they will help you transfer the data you want transferred from your PC to your MBP.

  • Delete file from application server

    Hi,
       Can any one tell me how to delete a file from application server?
    Thanks,
    Rahul.

    Basic question, please search for available information.
    Thread locked.
    Thomas

Maybe you are looking for

  • [solved] Troubleshoot ssh with keys (works from LAN, not WAN)

    I'm trying to set up ssh so that I can connect to my work computer from home. It is pretty much essential that I keep the work box as secure as possible at all times. (So I can't disable the firewall, come home and test it because IT would not be at

  • Unable to access my other macs in the airport network

    Since I have installed Leopard 10.5.1 I am unable to access my other MACs in my airpot network for file sharing. Interesting that I can accesss my older IMAC which has TIGER 10.4.11 installed. This bug is new since I updated to 10.5.1. Its funny but

  • Help needed in installation on a external USB portable HDD

    i have a WD My Passport USB 3.0 500 GB HDD i have successfully installed various os like Ubuntu, pinguy, mint etc. and so far i'm unsuccessfull in installing arc linux i use the net install cd and the installation is smooth only whn i reboot and boot

  • What is iPhoto doing with my pictures?

    I'm giving iphoto a try on my imac G5. I'm running OS 10.3.6 and iphoto 4.0.3. I just burned a CD by selecting an album and hitting the burn button. When I got to the printer, I found that the CD contained duplicate files for all of the images I had

  • Error, "Failed to load the folio"

    So I joined the Creative cloud. Comming from CS5 I must say I really like CS6. Today I say this youtube video from Terry White in which he explains how to create an app in Indesign. I had installed the latest DPS and Adobe Air from the Adobe download