To Move Multiple Files from one directory to another.

Hi,
I need to move multiple files from one directory in UNIX (application server ) to another. I need something like an FM 'STRALAN_COPY_FILES' which is also valid in ECC 6.0.
Thanks in advance.

Hello Sachin
Below you see a copy of how to use EPS_FTP_PUT using transaction SE37.
Import parameters               Value             
RFC_DESTINATION =                 NONE              
LOCAL_FILE             =         filename          
LOCAL_DIRECTORY   =              /dir1/dir2        
REMOTE_FILE             =        filename          
REMOTE_DIRECTORY   =             /dir1             
OVERWRITE_MODE        =          F        " force -> overwrite existing file                 
TEXT_MODE                    =   B               " binary
TRANSMISSION_MONITOR            X       " display transmission monitor            
*RECORDS_PER_TRANSFER            10                
*REQUESTED_FILE_SIZE             0                 
*MONITOR_TITLE                                     
*MONITOR_TEXT1                                     
*MONITOR_TEXT2                                     
*PROGRESS_TEXT                                     
*OBJECT_NAME  
Regards,
  Uwe

Similar Messages

  • How do i move a file from one directory to another?

    Can anyone help me in moving a file from one directory to another?
    The following code just does not work!!
    File source_file = new File(source_file);
    if(source_file.exists())
    File dest_file = new File(destination_file);
    if(!dest_file.exists())
    boolean moved = source_file.renameTo(dest_file);
    System.out.println("moved.."+moved);
    The varirable moved is always false.
    Can anyone tell me whts wrong in this code?

    The problem in your code is you used file object as argument when you create a new File. I changed a little bit codes and it should be fine now.
    String source_file1="test111.txt";
    String destination_file1="test222.txt";
    try{
         File source_file = new File(source_file1);
         if(source_file.exists())
              File dest_file = new File(destination_file1);
              if(!dest_file.exists())
                   boolean moved = source_file.renameTo(dest_file);
                   System.out.println("moved.."+moved);
    catch(Exception e){
               e.printStackTrace();
    }

  • How to Move  a file from one Directory to another directory.

    Hi All
    i am having a Java standlone Application reqiurements are
    1---->Connection pool To be Created.
    2---->Using Thread to read Multiple Files Simulatneously.
    3----->After Reading Those file I have to Move it to another folder.
    Plz help me.If possible give me sample code .
    I am in deep trouble for this project.

    Use java.io.File.renameTo(...) (look it up in the API documentation).
    Renaming a file doesn't work if you're trying to move files from one disk to another disk. In that case, you have to copy the file and delete the original.

  • Ssis - move files from one directory to another and rename destination file if present

    Hello,
    How is it possible to move files from one directory to another directory and if the file already exists in destination directory then rename it?
    Thanks

    1. Use a foreach loop with file enumerator pointing to first directory.
    Inside loop have a ssis variable of type string to get filename (@[User::FileName])
    Choose option as Fully Qualified in loop
    2. Add another variable called @[User::DestFileName], set EvaluateAsExpression true for it and set expression like this
    REPLACE(@[User::FileName],<source directory path>,<destination directory path>)
    put actual paths in above expression in your case
    and another variable called @[User::RenameFileName], set EvaluateAsExpression true for it and set expression like this
    REPLACE(@[User::FileName],".","_old.")
    3. Create a boolean variable say @[User::FileEXists]
    4. Add a Script Task inside the loop and pass @DestFileName variable in ReadOnly mode and FileExists in ReadWrite mode
    Inside Script Task write code as per below
    http://blog.dbandbi.com/2013/11/13/check-file-exists-ssis/
    5. Add File System Task choose operation as Rename File, Select IsSourcePathVariable as true and select @[user::DestFileName] variable and IsDestinationPath variable as true and select @[user::RenameFileName] variable
    6. Choose ExpressionAndConstraint option for precedeence constraint from ScriptTask to above File System Task and choose constraint as OnSuccess and expression as
    @FileExists == True
    7. Add another File System task with operation as Move File Select IsSourcePathVariable as true and select @[user::FileName] variable and IsDestinationPath variable as true and select @[user::DestFileName] variable. Join Script Task as well as
    File System Task above to this task and choose constraint as OnSuccess and Multiple Constraint option as Or (dotted line)
    Then once executed it will work as per your requirement
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Java Program to copy file from one directory to another failing

    Hello All,
    Oracle Applications 12.1.3
    RDBMS: 11.2.0.30
    SQL*Plus: 10.1.0.5.0
    Java beginner here so help is much appreciated.  I'm have some java code that I'm using to copy a file from one directory to another in an Oracle Applications Server.  I notice that when moving to a new instnace I started to get file not found errors.  I think it's because of the directory.  My question is, does the directory in which I trying to pick up the file have to be a DBA_DIRECTORY, or a UTL_FILE directory in order for the java to find the file and move it?
    Here is my code...
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "COPY_FILE_JVS" AS
    import java.io.*;
    public class COPY_FILE_JVC{
      public static void copy(String SourceFile, String DestDir) {
        File source = new File(SourceFile);
        File dest = new File(DestDir);
        File cpDestFile = null;
        try {
          if (dest.isDirectory()) {
              if(source.isFile()) {
                System.out.println("File name = " + source.getName());
                System.out.println("File name dest = " + dest.getPath() );
                System.out.println("File name cpDestFile = " + dest.getPath() + File.separator + source.getName());
                cpDestFile = new File(dest.getPath() + File.separator + source.getName());
              else {
                System.out.println("Directory or File Not Found");
                return;
          BufferedInputStream  br = new BufferedInputStream (new FileInputStream (source));
          BufferedOutputStream  bw = new BufferedOutputStream (new FileOutputStream (cpDestFile));
          int read = 0;
          while((read = br.read()) != -1) {
            //System.out.println((char)read);
            bw.write(read);
          br.close();
          bw.close();
        catch (FileNotFoundException e) {
        e.printStackTrace();
        catch (IOException e) {
        e.printStackTrace();

    I get these messages when calling the java from SQL Plus as follows...
    serveroutput on size 100000;
    dbms_java.set_output(1000000);
    MY_PKG.CopyFile('/home/my_user/set_env.sh','/interface/home'); (this is call to oracle pl/sql package which calls the java.)
    PL/SQL procedure successfully completed.
    Directory or File Not Found
    PL/SQL procedure successfully completed.
    If I change the directory from /home/my_user/ to any directory that is defined in DBA_DIRECTORIES or is a UTL_FILE directory to program works.  Is it perhaps because the java is in a PL/SQL package as seen below?  The PL/SQL program runs as the APPS user and I have issued the following the command grant JAVASYSPRIV to APPS.
    Here is the PL/SQL Package....
    CREATE OR REPLACE PACKAGE BOLINF.MY_PKG AUTHID CURRENT_USER AS
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2);
    +++++++++++++++++++++++++++++
    CREATE OR REPLACE PACKAGE BODY BOLINF.MY_PKG  is
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2)
    AS LANGUAGE JAVA NAME 'COPY_FILE_JVC.copy(java.lang.String, java.lang.String)';

  • Moving the files from one directory to another.

    It seems that this would be simple but I am not able to do it easily. I just want to move files from one directory to another directory. I tried the file class renameTo as in the following...
    File fFrom = new File("C:\\uhin\\batch\\outgoing");
    File fTo = new File("C:\\uhin\\batch\\outgoing\\back");
    fFrom.renameTo(fTo);
    but this doesn't seem to work. I have tried deleting the directory and then recreating it but this doesn't seem to work as in.
    fTo.delete();
    fTo.mkdir();
    any ideas ?
    thanks
    kris.

    That code you have there tries to rename the directory from C:\uhin\batch\outgoing to C:\uhin\batch\outgoing\back. I'm not sure if you can rename directories in general, but even if you can that particular renaming wouldn't work.
    However you didn't want to rename the directory in any case. You need to use a File method called listFiles (if I recall correctly... check the API documentation) which returns an array of File objects, representing all the files in that directory. Then loop through that array, and for each File in it, (1) create a new File object with the new name, and (2) call renameTo() to rename the file.

  • Move a file from one lacation to another in FTP

    Hi Experts,
    i have scenario were i have to move a file from one location to another in a FTP the source and the Target  structure are same can we go  with only configuration(ID) why because there is no mapping done but i have dbout when we create a sender agreement,receiver agreemant we need to mention the Message Interface is there any way to skip the IR(Design) part
    Do provide inputs
    Thanks,
    Sampath

    hi ,
      you can skip your IR part. follow this blog
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    Edited by: Robin on Jan 20, 2009 11:50 AM

  • Move stickie file from one mac to another, move stickie file from one mac to another, How do I move stickie file from one mac to another

    How do you transfer the stickie data file from one mac to another?

    I think this is the file -
    In (hard drive) > Users > yourhomefolder (the one with the house icon) > Library, look for a loose file named StickiesDatabase
    Copying that file to the same location on the new machine (and replacing the file there now) should move the notes. It is probably a good idea that both machines be running the same OS X version.

  • Is there an easy way to move multiple icons from one screen to another?

    I have multiple screens on my iphone 5c display.  I want to move multiple icons at the same time from one screen to another.  Is there a way to do this?

    You could put them all in a single folder and move the folder to another screen.

  • How do you select/move multiple clips from one timeline to another?

    Has to do with combining multiple edls from Avid - required due to an issue with duplicate reel names in the original Arri footage. I can move them one at a time, but it is very tedious. Is there a way to select multiple clips and move them together?

    Actually discovered the magic of the shift key.
    IRCP Beauty doesn't recognize multiple timelines in a session, so first you have to at least get the footage on multiple tracks in the same timeline. Shift + drag on the track will allow you to move it to another timeline. Also Shift + drag on the center of the first clip in a sequence will slide the entire sequence down - which is how timelines end up getthing offset all the time. Also, if there are multiple tracks in a timeline and some are locked and some aren't, Shift + drag on a clip will slide ALL UNLOCKED tracks in the timeline.
    Finally, Shift + click on either in or out marker moves both points up or down the timeline.

  • How do I Copy files from one directory to another?

    I know how to move files using the renameTo() method of File class, but is there a simple way to copy files, without the need of reading the input stream form one file and writing to a new one?

    Hi all,
    I ripped this off the jakarta-ant project's file copier (with a small tweak)..
    package com.museumcompany.util;
    import java.io.IOException;
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.lang.reflect.Method;
    import java.text.DecimalFormat;
    import java.util.Random;
    import java.util.Stack;
    import java.util.StringTokenizer;
    * This class also encapsulates methods which allow Files to be
    * refered to using abstract path names which are translated to native
    * system file paths at runtime as well as copying files or setting
    * there last modification time.
    * @author [email protected]
    * @author Conor MacNeill
    * @author Stefan Bodewig
    * @version $Revision: 1.8 $
    public class FileUtils {
    private static Random rand = new Random(System.currentTimeMillis());
    private static Object lockReflection = new Object();
    * Factory method.
    public static FileUtils newFileUtils() {
    return new FileUtils();
    * Empty constructor.
    protected FileUtils() {}
    * Convienence method to copy a file from a source to a destination.
    * Overwrite is prevented, and the last modified is kept.
    * @throws IOException
    public void copyFile(String sourceFile, String destFile) throws IOException {
    copyFile(new File(sourceFile), new File(destFile), false, true);
    * Method to copy a file from a source to a
    * destination specifying if
    * source files may overwrite newer destination files and the
    * last modified time of <code>destFile</code> file should be made equal
    * to the last modified time of <code>sourceFile</code>.
    * @throws IOException
    public void copyFile(File sourceFile, File destFile,
    boolean overwrite, boolean preserveLastModified)
    throws IOException {
    if (overwrite || !destFile.exists() ||
    destFile.lastModified() < sourceFile.lastModified()) {
    if (destFile.exists() && destFile.isFile()) {
    destFile.delete();
    // ensure that parent dir of dest file exists!
    // not using getParentFile method to stay 1.1 compat
    File parent = new File(destFile.getParent());
    if (!parent.exists()) {
    parent.mkdirs();
    FileInputStream in = new FileInputStream(sourceFile);
    FileOutputStream out = new FileOutputStream(destFile);
    byte[] buffer = new byte[8 * 1024];
    int count = 0;
    do {
    out.write(buffer, 0, count);
    count = in.read(buffer, 0, buffer.length);
    } while (count != -1);
    in.close();
    out.close();
    if (preserveLastModified) {
    destFile.setLastModified(sourceFile.lastModified());
    public File createTempFile(String prefix, String suffix, File parentDir) {
    File result = null;
    DecimalFormat fmt = new DecimalFormat("#####");
    synchronized (rand) {
    do {
    result = new File(parentDir,
    prefix + fmt.format(rand.nextInt())
    + suffix);
    } while (result.exists());
    return result;

  • How to move multiple tracks from one location to another on HD and keeping iTunes updated?

    Hi all
    I'd like to move/re-arrange some subdirectories of my iTunes' main folder and I'd like to keep iTunes library updated without broken links without needing to re-imports the moved albums/tracks. Is there any method to do this? Even with the help of some utility or app?
    thanks in advance!
    luca

    iTunes works this way.  You add a file. It makes a note of its location and metadata stored in the file and adds this to its own library database. 
    Note: All my answers are with reference to iTunes 7.5  (yes, 7.5). I've stopped trying to keep up with Apple's newer stuff which is why I rarely come here anymore.
    Answers to your specific questions.
    1&2)  I think I have in the past copied a file with the identical name over an existing file and iTunes was fooled into thinking it was the original file.  However, it didn't update the metadata in its own database until I highlighted the file briefly in a playlist.  This causes the original file to be re-read.  The same thing happens if I use a third party metadata editor to change the metadata in a file.  iTunes will continue to display the old data until I briefly select the file in a playlist or it starts to play the file.
    You can, by the way, add two files with the identical name (but in two different folders obviously) and iTunes will add them both as individual entries, even if the metadata is identical.
    3)  I don't have iTunes Match obviously (I can't even see the Store anymore with iTunes 7).  My third hand understanding is it won't do anything to your original files.  If it finds a match it will automatically download the match to your iTunes folder as if you had all the preferences settings set to use it normally.  I'm guessing you will then have two files for that track and you'll need to work on cleaning up the lesser quality one unless you want to just leave it.  Again, can't speak from experience.
    I have both preferences options de-selected and don't want to select them to test my reply. I don't want iTunes to do either because I have media organized by kind and source over two internal hard drives and 3 partitions.  I 100% manage my media manually and have always done it that way.  I think option 2 has iTunes restructure your folders according to album and artist.  I deselected both because i didn't want to constantly be fighting iTunes in its attempt to organize things how it wanted.
    If you're going to manage your media manually then you need to understand how iTunes works in detail and be willing to stay on top of it.  iTunes is designed to do everything on its own so people don't have to worry about things.  By unclicking its default preferences or moving files yourself in Finder or using a script to do so you are also figuratively clicking a button that says, "Okay, I know what I am doing and iTunes works."  Normally rule #1 with iTunes is never, never move a file to a different location in Finder and you'll see a lot of posts here from people who have "lost" items becaause they moved a folder or renamed it.  Maybe iTunes behaves differently when you deselect those preferences because I do this all the time and iTunes can track it as long as I don't move it to a different volume/drive.  I am very careful not to lose things or make duplicates, and of course I back up my computer before any major editing.

  • How do I move a file from one catalog to another

    I created a new catalog by mistake, I imported a file to this catalog, how do I move the file to the catalog that I have been using?

    You CAN export the catalog and then import and merge it to your correct catalog.
    But if it's just one file, why not just delete the new catalog and reimport the one file???
    tom

  • Move SAPDATA files from one drive to another

    Hi,
    I have a DR server running on Windows 2003 and Oracle 10.2.
    The SAPDATA drive Z is running out of space and I need to move it to a bigger drive.
    The server has two RAID 5 interfaces where all the disks are located i.e Disk 0 and Disk 1.
    Below is the plan:
    1)     create a new drive K in Disk 1
    2)     manually copy all SAPDATA files from old drive Z (located in Disk 0) to drive K
    3)     rename the old drive Z in Disk 0 to another alphabet
    4)     rename the new drive K to Z
    Start the server and SAP services and there should not be any issues for SAP in recognizing the "new" enlarged drive Z,
    do you agree?
    Thank you.

    Hi,
    Yes this will work. You can proceed.
    But make sure that you take a backup before proceeding further.
    Regards,
    Nirmal.K

  • Transfer files from one directory to another using HTTPS message protocol

    My client has an requirement where the source files are in different directory and they need to be placed in a target directory with the same filename..it looked simple so far... but the actual complexity is that the source files are on a Novell server where my XI box doesn't have visibility ( Novel client cannot be installed on OS win 2003 64 bit)  so File adapter cannot be used to read/write files, i need to design a solution to overcome this. My plan is to write a script or web service in Novel server and use that in the Sender HTTP adapter and also write another Web service to listen to Receiver HTTP adapter, i am not sure how HTTP adapter can be used for transfering files but my client insists on HTTPS as it is more secure. Can any one throw some light... if they had similar requirement before.
    Thanks,
    Ravi

    Hi,
    Sounds ok but... just to understand.. is the target also not accessible from the File Adapter? Otherwise why would you not use the file adapter on the receiver side?
    Secondly HTTP is ok but you realise that for monitoring the HTTP adapter is not part of the Adapter engine and hence if you have issues you could not simply goto the Comm Channel Monitoring to investigate?
    Maybe an approach using SOAP may be better assuming the mssages are not huge.
    Lastly you ask why would you use XI if you can just develop a separate servlet to do the job... well you can mention the following:
    Central Place for Monitoring all message flow and maintenance
    If you are using CCMS then it is very easy to integrate the errors there
    Consistency in overall design to be aligned with other interfaces
    these kind of things are good to bring up... remember that way after the project has completed someone will have to monitor and maintain all of this so it is nice to have a central point of reference to see exactly what interfaces you company has.

Maybe you are looking for

  • ITUNES WONT OPEN AGAIN

    I have been using the itunes program for a while and just the other day i tried opening it and this error message popped up. ITUNES has encountered a problem and needs to close. we are sorry for the inconvenience. Then there is two buttons.... send t

  • Can't see iTunes files after using usb drive for time machine

    I have a usb 1TB drive with my iTunes files on it from my old MacBook, I now have a MacBook Pro OSx 10.9.4 and I set it to be used for TimeMachine. I no longer can see my folders/files. Why and how do I get access to them again? I know they are there

  • PI 7.0 default client Implications

    Hi all, We have installed my production server PI 7.0 earlier and it is currently operating for some projects. But the problem is the client on which the production system working now is 001 (i.e default client). This we have just noticed that it is

  • Where do i find my AppleCare+ registration number?

    I just bought AppleCare+ for my iphone.  It arrived in the post and all I got was a A4 sheet titled 'packaging list' and a fat little book called the 'AppleCare + product guide'. So if I need to register the product, how do I find my  AppleCare+ regi

  • Suggestion - better file saving options

    From online Adobe tutorials and online discussions it seems that the file saving options in PS Touch are very limited and very frustrating for many people. I gather Adobe wants us to rely almost exclusively on the 'cloud' to save files in either .psd