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

Similar Messages

  • 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

  • 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 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 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 do I move files from one folder to another?

    On my MacBookPro I am trying to move files from one folder to a BSB drive.  I can copy, but I do not want the files left in the original location.  What do I do?
    J W

    Press the Command key while dragging them.
    (58054)

  • 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 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.

  • 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

  • How to copy pf-status from one program to another program

    Hi Gurus,
    Can any one tell me the procedure how to  copy pf-status of one program to another program .if i want to copy pf-status which is in production server to development server how can i do this.pls help me out.
    Regards.

    Hi,
    GO TO  SE41,
    Select Status,
    In from u can give  ur old pgm and staus name
    In To u can ur new one .
    Save and activate.
    Regards,
    S.nehru.

  • How to copy the data from one database to another database without DB link

    Good Day,
    I want to copy the data from one database to another database with out DB link but the structure is same in both.
    Thanks
    Nihar

    You could use SQL*Plus' COPY command
    http://technology.amis.nl/blog/432/little-gold-nugget-sqlplus-copy-command
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#sthref3702
    Edited by: Alex Nuijten on Sep 16, 2009 8:13 AM

Maybe you are looking for

  • Having trouble selecting part of a movie

    hi, have just upgraded to qt pro. am trying to select part of an existing movie (a .mpg in this case), in order do some editing. i can't get the selection in and out indicators to show up in the player window in order to do the selection. i followed

  • Pages Textwrapping to Next Page

    Hey guys, Sorry if this is redundant with another topic. It's only my 2nd day on a Mac so I'm a little lost right now. In Pages, I've noticed that text seems to wrap an entire paragraph to the second page when you are typing, leaving a large amount o

  • Where are magic mouse gestures in iPhoto?

    Before lion upgrade, a two finger swipe would allow you to switch between photos in iPhoto '11. This no longer seems to be the case. Any thought on how to enable this (similar to the new gesture in Safari, one finger swipe to go back or fwd).

  • A mapped elements relationship with other elements cannot be preserved

    Hi, I am trying to create an XML file from an XSD using excel macros and data from excel worksheet. The mapping takes place fine. However, when I try to save the mapped items into an XML file using SaveAsXML function, it gives me the following reason

  • Update apps in 11.1

    Mac user for decades. iTunes v. 11.1.1 has frustrated me. I'm reserving my comments regarding the design of the app but would greatly appreciate it if anyone would kindly tell me how to update my apps. My iPad is having issues updating software via t