Move File Object to Archive Directory

I am getting a file FTP'ed into a directory which I read, modify and process the data into a different directory. My question is that the origanal file that I read I would like to move to an archive directory. What is the best way to do this?
Thank you,
Mike

Couple of ways, depending on the platform, and if the machine os a server, work station, etc. Can you please let us know what your config is so we can advise you better. - Bart

Similar Messages

  • EDIFACT File TO IDOC Archive directory file name.

    HI Experts,
    I have EDIFACT file to IODC scenario. I have  multiple source file locaiton but only one Archive location directory.But I have three different kind of file coming form three different location.
    we can only have one archive directory per service, is it possible to manipulate the file name so we can tell if files were successful or failed?
    For example, FileName1.txt, if it was successful, it would move to the archive directory and rename to u201CFileName1.txt.PASSu201D,
    if it failed it would move to archive directory like u201CFileName1.txt.FAILu201D. Is this functionality possible?
    Or will we just have to rely on Alert Categories to tell us when files have failed?
    Kindly give your valuable suggestion.
    Regards,
    Sumit Gupta

    >
    sumit gupta wrote:
    > HI Experts,
    >
    > I have EDIFACT file to IODC scenario. I have  multiple source file locaiton but only one Archive location directory.But I have three different kind of file coming form three different location.
    >
    > we can only have one archive directory per service, is it possible to manipulate the file name so we can tell if files were successful or failed?
    > For example, FileName1.txt, if it was successful, it would move to the archive directory and rename to u201CFileName1.txt.PASSu201D,
    > if it failed it would move to archive directory like u201CFileName1.txt.FAILu201D. Is this functionality possible?
    > Or will we just have to rely on Alert Categories to tell us when files have failed?
    >
    > Kindly give your valuable suggestion.
    >
    > Regards,
    > Sumit Gupta
    When you say success or failure does it mean a successful IDoc created in SAP? if so you will have to use a BPM and on successful creation fo the IDoc write the file out with the PASS name else FAIL name.
    you can also look at employing  scripts but there is no standard feature for this requirement. I gather alert is a better option.

  • File content conversion:move files to a new directory

    hi all,
              I have a file content conversion sender and receiver scenario.Now my doubt is: XI is running on sap27 server.Input file is being created by an ABAP program in r/3 and file being put in sap29 server.
    In source directory if i am giving the sap29 path it is not working.Is there any way that i can write a OS command to move files from 29 to 27 before message processing ??
    Any other option available??
    thanks,
    Nisheeta

    hi,
          Yes the basis people have shared the folder and they have mapped the sap29 folder into sap27 using I:\ drive
    But the files are not getting picked....am i giving the source directory wrong??
    I am giving I:\Folder_Name
    suggestions needed
    thanks,
    Nisheeta

  • Saving file object to current Directory.

    Ok I did a file transfer thing, after I receive the file object, how do I save it to the current directory?
    Thanks.

    This saves an empty file.It's up to you to put data in it. I have no idea where your data is coming from.
    I wanna save the file and the contents to the current
    directory.What contents?
    Any ideas?Look at the OutputStream and Reader interfaces in the API.

  • FTP File Adapter: more Archive Directory

    Hello everybody,
    i have some interfaces whit FTP-XI-Idoc scenarion.
    we decided to save files after elaboration in different directory depending on month (yy-mm).
    Example:
    /Rxarchivio/0901
    /Rxarchivio/0902
    I see this link
    https://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
    very helpfull but i don't know how to parameterize variable of year and month.
    i try with this but don't work:
    SET CC=%DATE:6,4%%DATE:3,2%
    open ftp
    VCE01\selzsapd
    dpas_zles
    cd /Rxarchivio
    mkdir %CC%
    mget
    cd /Rxarchivio/%CC%
    mput
    quit
    any suggestion?

    Hi,
    I m not taking about FTP server. Your PI is on Windows or Unix.
    Id it is on UNIX the put the UNIX script to PI file system and give the path.
    FTP adapter pick the file from FTP location and the pick the UNIX script from PI FIle system and run script ..archive the files and then send message for further processing.
    Thanks
    Aman

  • Regds : Read archive Directory

    I want to read the archive directory name in sender file adapter at runtime in the message mapping?
    Please suggest how can i achive this?

    Want to read the archive directory name in sender file adapter at runtime in the message mapping?
    Why?
    For a given sender file channel, the Archive Directory is constant. One sender file channel can be used only in one Sender Agreement. That means for given combination Communication Component, Interface, Namespace there is only one Communication Channel (Archive Directory). These three variable can be accessed in UDF using
    map = container.getTransformationParameters();
    headerField = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
    /* similarly Communication Component, Interface */
    http://help.sap.com/saphelp_nw04/helpdata/EN/43/09b16006526e72e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/78/b4ea10263c404599ec6edabf59aa6c/content.htm
    i.e. if this combination of Communication Component, Interface, Namespace then this is Archive Directory, if this combination of Communication Component, Interface, Namespace then this is Archive Directory.
    Now we have 2 option:-
    1. Hard code in UDF for this combination this is Archive Directory.
    2. Store these values in a database (this combination this is Archive Directory) and access it in message mapping by database lookup.
    There is other option, write a Adapter module, which populate the Archive Directory in SOAP header of messages in Adapter Engine. And access Archive Directory in UDF, similar to this http://help.sap.com/saphelp_nw04/helpdata/EN/78/b4ea10263c404599ec6edabf59aa6c/content.htm
    . But, this option is not recommended as it is performance overhead, and as for a Communication Channel, Archive Directory will not change (we have to do manual edit), At least very less in production (we don't change it very day ).

  • Can't move files, only duplicate

    hello,
    i have some files at the root level of my laptop drive and i want to move them, but they only copy into their new locations (duplicating) they don't simply move with the gong sound. i'm wondering why. does it have to do with permissions or something?
    thanks
    max

    A 'move' is just shorthand for a 'copy to new location X, and delete from old location Y'.
    You can't delete something outside of your user account without Admin privileges. I haven't tested this, but for that reason I'd imagine you can't move files in the root directory. Copy them then delete them manually, supplying your Admin password when prompted.

  • Saving a file in a specified directory

    I have this network-application where I ask new users to enter their information. I want to be able to store this information in a file under that user's username. I want to make the directory for the user at my server and save the file inside that directory. I have tried several things but nothing have worked so far... Any ideas as to how I can create a directory from within a java program and save a file in that directory?
    Thanks,
    tiwari

    1. Create a File object for the directory
    2. Create the directory on the filesystem with File.mkdir()
    3. Write to a file in the directory.

  • How to Automate Compressing PDF files in a Watched Directory

    I want to automatically compress PDF files as they get placed into a watched directory. I would like the compressed files placed in another directory and have the original file either deleted or place in another directory. If Acrobat Pro X can do this, how do I set it up.

    I noticed that Acrobat Distiller will watch an input directory and move files to an output directory. I tried using Distiller to compress a PDF file, but all it did was move the PDF file to the out directory without doing any compression. Is there any way that Distiller could be configured to do what I want?
    I also called the number listed on the Adobe web site for LiveCycle products. They told me they don't sell their product to non government companies and they referred me to 4 Point to get further info. I called them and only got a voice mail. I'm waiting for a call back.
    I found a product that does exactly what I need. It is called PdfCompressor Professional Edition. But, it costs more than what I want to spend. I'm guessing that LiveCycle will cost more than I want to spend also. If there are any other products that cost less than $150, I would like to know what they are.

  • Reg:File adapter archive Directory

    Dear team,
    Our requirement is to read a csv file from a directory and archive the file in archive folder specified in the file adapter.
    If any exception is caught,then we need to read the archieve file from archive directory rename the archive file with source file name and place it in source directory.
    On the receive activity we are able to get the source file name and source file directory.
    <receive name="Receive1" createInstance="yes"
    variable="Receive1_Read_InputVariable" partnerLink="fileRead"
    portType="ns1:Read_ptt" operation="Read">
    <bpelx:property name="jca.file.FileName" variable="srcFileName"/>
    <bpelx:property name="jca.file.Directory" variable="srcDrFolder"/>
    How to get the archive file name and archive file directory from the receive activity so that we can store in local variables.
    Pls do help.
    Thanks

    Hi,
    Another way you can accomplish your scenario. Instead of deleting or archiving in beginning just move the file from inbound to archive location after business flow completion.
    In case of error, the file will remain at original position as moving operation is at the end.
    First read the file using read operation, then at the end create a file adapter with sync read operation. Change the entries in .jca generated with below sample.
    Sample jca file.
    <endpoint-interaction portType="SynchRead_ptt" operation="SynchRead">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
    <!-- Below properties are dummy except Type , it will be changed in runtime -->
    <property name="SourcePhysicalDirectory"
    value="srcdir"/>
    <property name="SourceFileName" value="abc.txt"/>
    <property name="TargetPhysicalDirectory"
    value="targetdir"/>
    <property name="TargetFileName" value="abc.txt"/>
    <property name="Type" value="MOVE"/>
    </interaction-spec>
    Then,in you bpel flow at the invoke for sync read add these two properties.
    <bpelx:inputProperty name="jca.file.SourceFileName"
    variable="varInputFileName"/>
    <bpelx:inputProperty name="jca.file.TargetFileName"
    variable="varArchiveFileName"/>
    <bpelx:inputProperty name="jca.file.SourceDirectory"
    variable="varInputDirectory"/>
    <bpelx:inputProperty name="jca.file.TargetDirectory"
    variable="varArchiveDirectory"/>
    - It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Durga

  • FTPAdapter - logical directory name - file not moved to archive directory

    I created a simple ftp service to read the file from remote inbound directory and archive it to an "archive" directory using logical directories. I supplied the input and archive directories. The process reads the file from the input directory, but doesnt move it to archive directory. In the opmn logs i see the following message
    File Adapter::Outbound> Since file could not be copied to specified archive directory, file : CUST__20081113002951.xml is being copied to a default archive directory :/apps/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/fileftp/defaultArchive/
    I checked the a) directory permission - this is the ftp users home directory , so it has all the bits set rwxrxrx- I even tried rwxrwxrwx, but same issue
    b) there is enough space on the box
    c) I can manually move the files around as the same user.
    Secondly, the files under the default archive directories are being created as root. Not sure why. Our server is running as "oracle" user.
    We are on 10.1.3.4
    any idea how to troubleshoot this ?
    Edited by: user9514124 on Nov 13, 2008 5:27 PM

    Just a thought. You are trying to archive to an FTP user's home directory. I assume that you want to archive remotely (on the source server)? If so you need to specify UseRemoteArchive="true" in the WSDL file for the adapter. If you forget that the adapter archives locallly on the SOA Suite server and perhaps there the directories are indeed missing or have the wrong rights?
    If you are using remote archiving and it doesn't work, have you tried to login with an FTP client and upload a file to the archive folder with FTP (as the FTP adapter user)? That is what the FTP adapter will do.
    If you are using local archiving, check all the parent directories and make sure that they are fine as well as the target directory. Also look into the file ownership issue, the files should not be created as root if everything really runs as oracle! Perhaps someone has accidentally started something as root?
    Good luck!

  • Regrdin file transer from al11 to archive directory  URGENT

    HI ,
    my actual require ment is
    in BDC inbound interface i have to read data from applcation server .i did that.
    but now i have to send that file to archive directory after succefully reading that.
    can anybody help on this
    wt is archive directory?
    how to send that application server file to archive directary after succesfull reading it? .......
    is there any function module for this....
    wt is archive directory?

    Hi,
    An archive directory is just a concept where one directory on the operating system holds files that have been processed.  You don't need to do anything special, either take the internal table you already have and write it to a file in this directory or call an operating system command to move the file.
    You just need to find out for your system which directory is the archive directory.
    Regards,
    Nick
    P.S. Please consider the rules of the forum and do not mark your post as URGENT.

  • Read some HR archive files (object PA_PIDX) using Abap report

    Hi experts,
    an ABAP program that is supposed to read some HR archive files (object PA_PIDX) but all we can read is the object, we cannot access the individual lines. Please help
    My code
    Output of the report as well as output of archive program
    Cycles comptab. archivés
    0000000038
    0000000040
    0000000044
    0000000045
    0000000047
    0000000050
    Cycles comptab. ignorés (pour détails voir protocole de job)
    0000000001  Simulation
    0000000002  Simulation
    0000000003  Simulation
    0000000004  Simulation
    0000000005  Simulation
    .....etc
    Please help
    Edited by: Blaiso on Apr 1, 2011 5:54 PM
    Edited by: Blaiso on Apr 1, 2011 5:59 PM
    Moderator message: please post only relevant code parts, your post must be less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on Apr 2, 2011 9:59 PM

    Hi Ajay,
    1.  You have to create a separate field catelogus and AIS according to your requirement with the required fields you want . Because the standard structures and field catelogues contains many fields from all tables. So before doing the read operation you have to deactivate the standard AIS and activate your newly created AIS .
    2. Can you give some more details for this question to be answered.
    3. The important archiving tables used are ARCH_IDX,ARCH_RPRG,ARCH_DEF.
    4. While scheduling the Read process in batch mode , it will give you three criterias to be entered.
         . Spool Parameters
         (ii). Start date
         (iii). Archive selection of files.
        Unless you enter values for any one of these options , You cannot execute the batch job.
    Hope this would help you.
    Regards - Swarna.

  • Is it possible to move the rsw.vba file to a shared directory?

    As I create more global functions, contants, variables, subs etc., this file will get very important. So Important that I suspect if it were somehow to become corrupt, deleted or lost most or all of my scripts would be broken. Right now I don't have source control software so I would like to store this file on our fileserver. I have already moved my repositories, scripts and DataBank Files to this location.
    Thanks in advance,
    hagstal

    Hagstal
    i don't believe is possible to move the RSW.vba file to a shared directory, however you can just copy the file across different machines.
    I would also strongly recommend that, (if this file is gonna become so important) to use a source control system, SVN and tortoise make a very good combination
    (http://tortoisesvn.tigris.org/).
    Have a look at this thread, it has some other ideas on how to share your RSW.vba file
    http://qazone.empirix.com/thread.jspa?threadID=411&tstart=0
    Message was edited by: aamat

  • How to move files to Archive folder in same document library

    hi,
    we have one document library (Upload Documents) in that document library we have Archive Folder , when upload document to upload document library first we want check same document   name is there or not and check version also ,if the same document
    is there in that document library then move to that  document to Archive  folder  with  same version and add to document to  upload document library..
    ex:
    Document Lib name:---Upload document
    folder name-->Archive Folder
    Document: Test.txt and version is 1.0
    when upload  same document to document library the Test.txt file move to archive folder and add same document in upload document library with new version

    you can look at Item Adding Event receiver and before you add the new document do you check and move the document to archive folder 
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

Maybe you are looking for