How to copy a file from one location to another ???

Hi,
I have a file ('D:/Pictures/1.jpg') and I want to copy this 1.jpg file to a location called 'D:/Folder1'. I tried the WebUtil_File.copy_file function, but it does not work. it returns false boolean.
I am using windows xp and oracle 10g.
The webutil configurations are also completed.
This D: drive is the one which has oracle 10g application server installed.
Am I doing anything wrong or missed?. I need to complete this urgently. but it does not work.
Or any other way to copy a file from one place to given any path?. After this I have to renaming (may be using Rename_File function) the copied file. Please advice me.

An alternative could be HOST command, that calls OS prompt to run a command in the server and then return the focus to the Forms:
HOST ('copy D:/Pictures/1.jpg D:/Folder1/1.jpg');
Edited by: Kleber M on Sep 9, 2011 12:38 PM

Similar Messages

  • How to copy .gif files from one dir to another using runtime.exec

    hello sir/madem,
    i want to copy some gif and jepg files from one directory to another dir using swing.
    when i tried with using runtime.exec(String[]) i am getting the following error.
    anybody please tell me what is the problem in my program
    java.io.IOException: CreateProcess: ren c:/windows/desktop/copy.java c:/windows/
    cc.java error=0
    code:
    public class copy
         public static void main(String[] args)
              try{
                   String s[]=new String[3];
                        s[0]="ren";
    s[1]="c:/windows/desktop/copy.java";
    s[2]="c:/windows/cc.java";
              Runtime rt=Runtime.getRuntime();
    Process p=rt.exec(s);
              int i=p.waitFor();
              System.out.println("i is "+i);
              }catch(Exception e){System.out.println(e);}
    please mail me to [email protected]
    thanks in advance
    samba reddy
    india

    why use the Runtime? There are methods for this in the IO package ...

  • How to copy a file from one folder to another folder in Linux

    Hello everyone,
    Oracle forms 11g 11.1.2.0.0
    OS: Oracle Linux
    We use webutil to upload files to the application server from the client machine, and stores them in a folder named JOB_DOCS on the application server (This folder is created as a databse directory too). File types are JPEG, GIF, PDF, TXT, BMP, DOC, XLS etc...
    At a later stage when the user tries to view the uploaded documents, this was not getting displayed on the screen
    on our windows server, when the user clicks on the print button we copy the file from the JOB_DOCS folder to the forms\java folder using the below command
    HOST('COPY ' ||d:\JOB_DOCS\test.pdf||' '||'c:\oracle\middleware\as\forms\java\test.pdf ,NO_SCREEN);
    once the file is under the forms\java folder then it is getting displayed on the screen to print or save, and later we remove the file from forms\java folder.
    But my problem here is, recently we have installed our application on Oracle Linux server, and we have JOB_DOCS folder there, and the users can upload files to this folder also. How can we copy the file test.pdf from JOB_DOCS to forms/java in linux?
    And what could be the reson for the document cannot be accessed from the folder where it is saved? We tried giving folder permissions, adding the folder to PATH variable etc.

    For copying and moving directories you can use the cp and mv commands just like you use them with files. Yeah, I know. If you've already tried to copy a directory with cp, you've probably noticed that cp just complains at you. Probably it says something like cp: omitting directory yadda yadda. You see, the cp command wants you to use the -r option if you want to copy a directory with its contents. The -r means "copy recursively":
    $ cp -r dir1 dir2
    The above creates a directory named dir2 whose contents will be identical to dir1. However, if dir2 already exists, nothing will be overwritten: the directory dir1 will be copied into the dir2 directory under the name dir2/dir1.
    When renaming directories, you use the mv command exactly the same way as with files:
    $ mv dir1 dir2
    When dealing with directories, mv works a bit like cp does. If dir2 doesn't exist, the above will rename dir1 to dir2, but if dir2 exists, the directory dir1 will be moved into the dir2 directory under the name dir2/dir1.
    ref http://www.tuxfiles.org/linuxhelp/dirman.html

  • How to copy a file from one PC to another in ABAP program

    Hello Friends,
    I have a requirement where I have to copy a file from a central location ( central servers like
    inblr102 or
    dwdf ) and save it on local PC in ABAP code. Also, while saving it should ask for the path on PC. Can any of you please help me in this?
    Thanks in advance!
    Divya

    Hi,
    Check out this link. This deletes file,  probally you will get some hint to copy.:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/deleting%252bfile%252bfrom%252bwindows
    Thanks,
    Krishna

  • How to copy file from  one location to another

    Hi,
    I am new to java, I tried the following code to move the file from one location to another
    public class CopyFiles {
    public String copy ( File source, File target)
    throws IOException {   
    FileChannel sourceChannel = null;
    FileChannel targetChannel =null;
    try {   
    sourceChannel =new FileInputStream(source).getChannel();
    targetChannel= new FileOutputStream(target).getChannel();
    targetChannel.transferFrom(sourceChannel, 0,
    sourceChannel.size());
    finally {   
    targetChannel.close();
    sourceChannel.close();
    return "Success";
    public static void main(String [] args) throws Exception{   
    File source = new File("C:\\users\\download.pdf");
    File destinationFile = new File("C:\\apple\\download.pdf");
    copy(source, destinationFile);
    The above code is working perfectly, but I Don't want to include the file name in destination file. i.e. File destinationFile=new File("C:\\apple"), and at the same time the pdf with same name has to get stored in the destination location, how can I achieve this.

    kameshb wrote:
    I Don't want to include the file name in destination file. i.e. File destinationFile=new File("C:\\apple"), and at the same time the pdf with same name has to get stored in the destination location, how can I achieve this.It's not totally clear what you're saying here, but what I think you mean is that you don't want to explicitly set the destination file name--you want to just give the copy the same name as the original. Yes?
    If that's the case, then break the original up into separate directory and file name portions, and then construct the destination path from the destination directory plus original file name. You can do that by manipulating the full path string, or by using the methods in java.io.File.

  • Copy File from One Location to Another Location through xcopy or any

    Hi,
    I Need to copy one file from one location to another location. That file need to save in C:\Windows\System32 folder
    I need to create one .bat file and i want apply that bat as a startup script through GPO.
    I tried through XCopy if i test in machine that is working. If i tried in other machine that is not working. becoz of some Credential issue
    I tried in the script by netuse command after that my script itself not working.
    SET username=XYZ\Administrator
    SET password=abcd
    @ECHO OFF
    cmd "cd C:\"
    net use "\\10.50.5.68\c$\Windows\System32" %password% /user:domain\%username%
    :copy
    Xcopy /S /I /E D:\DLL \\10.50.5.68\c$\Windows\System32 
    Regards, Hari Prasad.D

    You cannot do that in a startup script.  You do not need to do that in a startup script.
    To add files to the system use GP Preferences.
    On Window 7 and later only the Trussted Installer is allowed to add files. (That means only Microsoft.)
    No programs or users should ever alter files in the system area.
    ¯\_(ツ)_/¯

  • OpenScript: 1.     How to move the scripts from one location to another location. in OpenScript; Copy, paste or Import, export

    How to move the scripts from one location to another location. Copy, paste or Import, export

    Both way you can do.. Difference is - if you copy paste to another folder script dependencies will not move with the same( ie Assets added), whereas if you export and import the script all dependencies will be correlated automatically

  • How to move SQL database from one location to another location i.e. from C' drive to D' drive

    Hi, How to move SQL database from one location to another location i.e. from C' drive to D' drive ? please share some link.
    Thanks and Regards, Rangnath Mali

    Hi Rangnath,
    According to your description, my understanding is that you want to move databased from C drive to D drive.
    You can detach Database so that the files become independent, cut and paste the files from source to destination and attach again.
    There are two similar posts for your reference:
    http://mssqltalks.wordpress.com/2013/02/28/how-to-move-database-files-from-one-drive-to-another-or-from-one-location-to-another-in-sql-server/
    http://stackoverflow.com/questions/6584938/move-sql-server-2008-database-files-to-a-new-folder-location
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How do I move files from one album to another?

    How can I move files from one album to another? And why does itunes split up imported folders?

    Press the Command key while dragging them.
    (58054)

  • How do I transfer files from one computer to another without using cables??

    How do I transfer files from one computer to another without using cables?

    Wifi network
    Email
    Thumb Drive
    Online storage such as, iCloud Google Docs, SkyDrive, etc.

  • How to copy OVD configuration from one machine to another?

    We have two machines with OVD servers on them. The configurations should be identical from one machine to the other. We suspect there is a problem with the configuration on one of them. We need to know how to copy OVD configuration from one machine to another.
    Can you tell us how to do that?

    well i have this in mind which may help you.
    You would need to have a public ip address to the machine you have consoled to and on internet.
    Download the tftp software from below link.
    http://tftpd32.jounin.net/
    This software does not only act as the tftp server but also you can select the interface of you ethernet card as tftp server ip address.
    For ex if you are connected to a console and have a wireless card which is connected to internet also you connect you eth lan card to the eth or fast eth of the router.
    you can select which ever interface you want to act as the tftp server.
    you will need to add ip addres for you lan card and also config the router port as same if needed.

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to transfer iweb files from one mac to another?

    How to transfer iweb files from one mac to another?
    I have a macbookpro, and I am planing to transfer my iweb data to a new imac, is this possiable and will everything transfer over properly? Will I have problems doing this and how can i do this?

    thank you very much!
    another question,
    if i were to use mobil me to publish my site (at this time i use ftp) will i have the ability to have an outside programer log into my mobil me account and adjust things around in my html codes or add things to my site without iweb? at this time i use ftp and transfer my files from cyberduck to my hosting company. I am new and not very firmilure with the files in my hosting company, so i have help sometimes from a programer that fixes my html codes sometimes for example this page of my site i had someone help me with...
    http://www.sylvartfloraldesigns.com/SylvartFloral_Designs/ScheduleConsultation.html
    will i have the option to do this through mobil me and have someone help me from an outside source, log into my mobil me account and have them adjust things for me?

  • How To Copy Selected Music From One Library to Another?

    What is the best way to copy selected music from one library to another?
    I have a big and growing iTunes library -- 33,000 songs.
    A year ago I copied my library to my daughter's new iMac.  Now, a year later, I'm off to visit her and wonder how best to update her library.  In the past year I have added a number of items to my library and I'm sure she has done the same -- some might be the same but many will be different.
    How do I update her library with the new things I've added in the past year but not wipe out things she had added or duplicate when we each have a song?
    I can load any / all of my stuff on an external HD and take that to plug in to her computer.  Then what?  I want to avoid duplicates and make sure I get stuff like album artwork.
    I'm running iTune 10.4 on an iMac with OS X 10.6.8 -- my daughter will have the same iTunes and OS X once we update her software.
    Any advice would be great.
    Thanks

    If you're sharing the same Apple ID and all your songs are from the iTunes Store, it's easy:
    In iTunes on your computer, go to File->Preferences->Store and check the box next to MUSIC under AUTOMATIC DOWNLOADS.
    You should also read this article, the section titled TO DOWNLOAD PREVIOUSLY PURCHASED APPS, BOOKS, MUSIC, OR TV SHOWS TO YOUR COMPUTER:
    http://support.apple.com/kb/ht2519
    You could also use an rsync utility such as backuplist+ to perform a 2-way sync of the files in your two libraries while your computers are connected via FireWire with one of them in FireWire Target Disk Mode, or from your external hard drive with your daughter's computer and then to yours again. After that, you'll need to use iTunes on each computer to update its library with the new files:
    http://rdutoit.home.comcast.net/~rdutoit/pub/robsoft/pages/backup.html
    This last would also be the preferred method if you have authorized each other's computers for media purchased with each other's Apple IDs (i.e. you are not sharing the same Apple ID), or if you have music from sources other than the iTunes Store. Most likely, though, music from sources other than the iTunes Store would not be legal to copy in this way for this purpose, although there is probably no technical impediment.

  • How do i transfer files from one mac to another?

    how do i transfer my files from one mac to another mac?

    I normally use an External Hard Drive or Flash Drive for moving files from both Mac's and PC's, but if you want to move from an old Mac to a new one see > How to use Migration Assistant to transfer files from another Mac

Maybe you are looking for

  • Locked out of Guest mode on iphone 5 help?

    so I have guest mode enabled on my iPhone and I accidently triple clicked and I don't remember the passcode Ugh. I Don't want to restore my phone and I tried going on itunes to try to restart it and nothing? Please help

  • Query Designer: Am I on the right Forum?

    Hi All, This is regarding query issue. Is this the right forum for this issue or is there a forum for that? Kindly tell me where should i post this kind of issue. BTW, below is my issue. I'm finding it hard resolving the defect. Needs advice on this

  • When I am finished editing an image in Lightroom, what files or versions should I have in my database of images?

    When I am finished editing an image in Lightroom, what files should I have in my Library?  I start with a RAW file or a tiff scan from film. I label that "A" as the archived file. I make a virtual copy to work on in the Develop module. When I am done

  • ITMS and the Hard Drive Crash

    I'm sure this has come up a million times before, but a search didn't yield the answer I was looking for. I have my iTunes music and movies on an external HD. Last night that HD started making a weird noise, as if the rocker arm in the drive is stuck

  • Itunes wont open on my laptop? tried everything!

    i've tried uninstalling and reinstalling .. the support help on here and i cant find anything that will open my itunes, no message shows.. just nothing happens! help?