Copy file from one server to another

I have two intranet sites on two different servers. There is an image on the site1 which I would like to copy to site2. How do I do that ?
Here is my code.
<cfset image1Ext = Right(firstStoryImg, 3)>
where firstStoryImg evaluates to http://mycompany.com/site1/images/firstImage.gif
The following code is throwing "The cause of this exception  was: java.io.FileNotFoundException:" error.
<cffile action="copy" source="#firstStoryImg#" destination="/folder/Images/image1.#image1Ext#" nameconflict="overwrite">

What he said.
In addition:
<cfset image1Ext = Right(firstStoryImg, 3)>
What happens if someone uploads a (valid) .jpeg file? You'll land yourself with a .peg file, that's what.

Similar Messages

  • How do you copy files from one user to another

    How do you copy files from one user to another user on the same machine?

    open your home folder in finder move file to public, log into other account, click the go tab on the finder menu, select computer, your hard drive (Macintosh HD Default)>Users, the origonal user> public and drag that file to your specified folder.
    hope it works
    Craig.

  • Copying report file from one server to another requires refresh database?

    Hi,
    I am using Crystal Reports 11 for development.
    We have a number of crystal reports that are served on a web server running classic ASP that uses these reports with Embedded Crystal Server XI installed on the server.
    When I am developing or modifying a .rpt file (report) I connect to a UAT/development database on a dedicated development server.
    When I am happy with the report and testing is successful I copy and paste the report onto the production server, replacing the old report.
    The problem is I don't have a user account and password on the production server. Our DBAs are the only one with passwords on the prod servers. If an application needs a password entered they come to my desk and enter it for me.
    The problem is in order for the modified report to work on the production, I have to call up a DBA to "verify the database" for me by connecting to production server and entering username and password.
    This is really annoying.
    Why can't I just disconnect\log off server in crystal reports, then copy and paste the .rpt file to prod server and be done with it?
    If I had dozens of reports to change, it seems very rigid that I have to ask a DBA to enter the user account and password used by the application to run the report.
    Can someone please explain how to be able to copy and paste modified reports/ or new reports from one server to another without having this problem.
    Thanks
    Haggisns

    Moving to the Legacy SDK forum.
    Crystal can be magical sometimes but if you don't tell CR where the database is how is it to know you moved it?
    As you have seen and for security reasons you can't simply "drop" a report on any server and expect it to just connect to a new DB server without being asked to enter in credentials or that you have changed the DB server to report off of.... If it's too much work for the DBA to set log on info then he should give you access to so can.
    Thank you
    Don

  • 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)';

  • Copying files from one workstation to another only works in one direction

    I could copy files from my workstation to another workstation but could not copy files from that workstation to my workstation.  There are 2 Cisco switches between these workstations.
    I found out that one switch had its workstation ports hard coded to 100Mbps but the uplink ports (on both switches) were set to auto (the uplinks were 1 Gbps ports).  This caused the copy problem.  Once the w/s ports were set to auto, the problem
    went away.  I'm just wondering if anyone else has had this problem but found that the solution was something different than what I found?
    William Fearn

    I don't think that is possible, to platform specific. You'll need to make the directories accessible without password protection, or use another way of copying the files, such as FTP. There are multiple FTP packages available for java, such as:
    http://jakarta.apache.org/commons/net/
    (of course that would require setting up some sort of FTP server)

  • Moving user files from one server to another.

    Hi everyone
    I would need your help to help me migrate the user files of around 300 persons to a new server.
    Is there a tool that could help me doing that?
    Here is the situation:
    I have an old 2003 server with all the user accounts. We are using the shares to manage rights.
    We want to migrate all these accounts to a 2008 R2 server using NTFS rights.
    So:
    is there a tool that could:
    - copy the files and put NTFS right automatically with the username (%username%) as owner for each user personal folder.
    - change the path of the personal folder in each account in AD to the new server.
    - Make them automatically members of a specific group (We use that group to exclude these users from the old login script that would've map to old server instead.)
    is there anyone who could help me with this issue?
    Thank you very much!
    Dag

    Hi Dag,
    You can use robocopy to copy user files NTFS permissions from one server to another server and use /COPY:O to copy the owner information.
    For robocopy command, I would like to suggest you refer to the below article:
    http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx
    Robocopy will not help copy Share permissions but only NTFS permissions. So if the drive letter will not be changed, you can backup and restore the Share permission with steps here:
    http://support.microsoft.com/kb/125996
    Then you can refer to the article below to change the path of the personal folder in each account in AD:
    Change a user's home directory
    http://technet.microsoft.com/en-us/library/cc732253.aspx
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • 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 Drive to Another & Missing Keyword Tags

    Hi,
    I use LR 2.7.  I want to copy one file from one drive to another drive with the same file name.  I thought you could drag the file, but it doesn't copy over the file in the other drive, can you explain what I have to do? 
    Also, I tried to import the folder into another drive, but it doesn't copy the keyword tags.  Is there a way to do this?
    Thanks
    Barb

    Hey Barb,
       Well, if you use the Year/Month/Day/pictures_here  format, none of the folders contains a massive amount of folders.  It's not the number of folders that generates problems, it's having them all in _one_ folder that creates slow-down issues.  Imagine if you had a deck of cards; look for one card... you have to go through all 52 cards to find it.  But, if you broke it down into the 4 groups, you only have to go through 13, which is lots faster.  Now imagine going through 15000 instead of 52...
    Look at the way lightroom can automatically import by date;  it has several preset formats.  If you pick one of those, then when you import new photos, it will automatically create any missing ones, and you have lots less to do.
    Depending on how much work you have already done, you might consider making a new catalog and just importing all of your photos again, and let it create everything quickly for you.
    You could save all of your "edit" changes by writing out all of the xmp files first.  But with 15000 files in one directory, this will double it to 30000 (one per image!), but will preserve all of your edits if you choose to make a new catalog approach.
    As for combing catalogs, once you have one catalog the way you want it, you can select "import from catalog" and it will suck it into a new one, thus combining the catalogs.  The only problem I can see is that it will import it in the format you already have it, so you have to organize it manually before you import it.  Otherwise, you'll get your old format and your new format in the one catalog (but can then move pictures around if you need to).
    Personally,  I'd go the 'write xmp files, create new catalog' approach.  Then just recreate my collections, etc.
    But either way you do it, it will take some time processing, as that's a lot of files to start with!
    Ciao!
    Jason

  • 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.
    ¯\_(ツ)_/¯

  • How to transfer the files from one server to another through pl/sql...?

    I want to transfer all the files from source server with respective directory to designation server with respective directory (designation server - oracle reside server).
    Is it possible to ftp from one server to another server(designation server - oracle reside server) through pl/sql. these two servers are independent & unix server.

    No ... The package mentioned in
    http://www.oracle-base.com/dba/miscellaneous/ftp.pks
    this works for across the server i.e. transfer the files from one server to other (it is basically ftp) ..
    So it is NOT correct that this code transfer the file between two location & with in server..

  • Moving Files from one server to another

    How i can move different files / Oracle reports from one server to another...
    secondly , if i want to access Oracle Discoverer reports from new server , either i need to install Discoverer on it or not...If yes how i can install & configur it?

    Need guide lines to transfer Oracle reports from one server to another ....Need help...Working on Unix environment....
    Forward me commnads to move data...please

  • Moving directory with Software Update files from one server to another

    Hi guys,
    I have recently bought a Mac Mini to move on it my test system Mac OS 10.9 with Server 3.0, running on VM.
    My question is:
    Is it possible to move the Software Update packages/directory from one server to another, so I don't need to wait a whole week to have them all downloaded from the Apple servers?
    I assume, if replace all the Software update fodder it is not going to work as there are some kind of index files elsewhere that will not accept that change.
    I haven’t tried any migration assistant as don’t want to replicate the server.
    Any suggestions, please?

    hi Lucas,
    i just stumbled onto this post of yours while searching for solutions for a somehow related issue that's kept me thinking.
    your post isn't new, yet it received no answers... maybe you found a solution already.
    in case you haven't, a possible hint might come from https://discussions.apple.com/message/20478878#20478878
    for the record, i've installed os x server 3.0 on mvrx 10.9 on a 4-year old Intel Core 2 Duo mac mini with 500GB disks.
    in my case, it's the almost 200GB of update files wasting what's left of my storage real estate to press for a solution.
    tried to do what's suggested here, seems to work fine on my system, too. hope this helps.

  • How to compare the files from one server to another

    Hi !
    I want to compare the files present in one server to another server. I had to list out the files which is not present in the server and import those files to an excel file. There are lot of folders and lot of files present inside those folders. I want a java or jsp or javascript program code for this or any site which indicates how to do. What are the requirement for this program to implement like any tool or any other techniques. Please can u help me out.

    No ... The package mentioned in
    http://www.oracle-base.com/dba/miscellaneous/ftp.pks
    this works for across the server i.e. transfer the files from one server to other (it is basically ftp) ..
    So it is NOT correct that this code transfer the file between two location & with in server..

  • How to copy file from one table to another table at another database

    I need to transfer my tables from one workspace and schema to another workspace and schema. Basically I need to create again all the tables at this new schema. How could I transfer data from tha table at old schema to the table at new schema when this table has files stored in it? (data type is blob)
    thank you so much,
    Silver

    Hello Silver,
    Depending which database you're using (if it's available) I would recommend to use datapump.
    Datapump allows you to copy an entire schema to another database, it's the "new" export/import you might now.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • How to copy files from one user to another on same macbook pro

    I used the migration assistant to move files from an old windows pc to my new macbook pro.  It created a second user and put everything there.  I now can't figure out how to move them so they are under me.

    Welcome to Apple Support Communities
    The easiest way is to put your files in /Users/Shared. To access to this folder, open a Finder window, select the Go menu (on the menu bar) > Go to Folder, and type that directory.
    That folder can be read by all users, so you won't have any problem to copy your files to the other user account.
    Another option would be to copy your files to an external drive. Also, see > https://discussions.apple.com/docs/DOC-5472

Maybe you are looking for

  • Movie works on mac but not PC...help!

    Hi! Hopefully someone out there can help me... I am trying to make a video play on a website that I designed. The video will play on a mac, but not a PC. When the user clicks on the link, the video (.mov) should start playing in whatever media player

  • A problem about digital signature authentication

    Hi all: I just want to know how to implement the digital signature in the adobe form as well as its theroy, processing and the server condition. Please inform me any document available for reference. Thanks.

  • Archivelink Search using Trex

    Hi All, I have activated the index release for Archive link in SKPR06 for document area ARCHLINK. I wanted to know how to which class is meant for Archive link to create indexes like DMS_PCD1 for DMS in SKPR07 and which report to use for the search.

  • Gantt Chart View for Multiple Projects

    Hello all; Is there any way to see a complete Gannt view which refers to multiple project. means I' d like to select more than 2 project at the same time and look those Gantt view in order to realize what is going on for all projects.. ?

  • Will not convert a page to a PDF using  quickbooks software

    when using quickbooks,  I usually print the packing list directly to a PDF, instead of printing paper copy. it will no longer  do this - is this a QB problem or a adobe problem?