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

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.

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

  • 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

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

  • 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

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

  • I want to create a "batch file" that will copy files from one folder into another, overwriting what is currently in there.

    I've got a game that has a folder with Saved Games (Okay, it's Minecraft). I don't always have my external drives because I take my Mac Mini from my house to my friend's house and of course back after we finish playing.
    There are times where I want a back up so that if something happens we can restore it as easily as possible.
    What I've been doing is copying the particular saved game and pasting it to my desktop, replacing the new backup over the old backup. I'd like to be able to create a "batch file" so that I can just double-click on it and it will copy and paste overwriting the old version.
    Since this is being automated I've been thinking. It would be nice to have 10 backups which I would like to have numbered from 1 to 10 (and not 0 to 9).
    I'd like the batch file to delete backup 10 then rename backup 9 to 10 and 8 to 9 and so forth until backup 1 becomes backup 2 and then my live copy then gets copied to my desktop. I guess that one really doesn't need a number after it. It can have the exact same name.
    Don't worry about automating the restore. I just want the backup part of it automated. I'm not a UNIX guy but I've tried to figure it out and it is just not working. So ... if someone out there can reply with a solution for me that would be great.
    Extra credit for automatically compressing the backups with the built in compression utility so my backups use less space.
    Thanks in advance.

    I have another psd (adjustment_layer.psd) file that only has one layer, and it is an adjustment layer. . 
    That is possible. An adjustment layer must be over a layer. The layer that it is over can have its visibility off but there needs to at least two layers in your (adjustment_layer.psd) file.  For you can not have and adjustment layer without a layer to adjust.
    Are all your PSD file the same in size  x px by y px at z DPI?
    It would be easy to create an action just to add the adjustment layer you want if your (adjustment_layer.psd) file adjustment layer, layer mask is a reveal all or hide all mask. You can Batch the action or use the Image processor script and have it include your action that add the adjustment layer  you do not need to write a script.
    I would also record that action to add the adjustment layer clipped to the layer below. There is a bug in CS4 and CS5 Action Player. Actions that have recorded adding adjustment layers to be applied to all layers below may play incorrectly.  You will have to pay to get a fix  for this bug for Adobe is not going to apply a fix the the current releases of Photoshop. The bug is so far slated to be fixed in CS6 time will tell.

  • Copying file from one event to another deleted large number of photos

    I was doing some house keeping on my Photo Library in iPhoto11.
    I opened a event and selected al the photos in this event and then copied them to another event. This operation took a very long time. The end effect is that in excess of 10k photos have dissappeared from my libary and are nowhere to be seen.
    I tris rebuildingt the library but this makes no imprevement but it shows that the library size reduces from 12Gb to about .5 Gb. But both librarys seems to be identical. So where have my photos gone? I have about 6 years worth of photos in this library and because of an earlier problem with OSX on my laptop I had to move this library to an external disc which is not backed up. I think I may have an older backup! I did to at any point press delete or move anything to the trash - this seems to be a software but - any suggestion how to recover my photos. I have checked the system trash and they do not seem to be there either.
    Help

    Open the event and select the photo you want to duplicate, go to the edit menu and select copy (command-c), go to all events and select the target event and go to the edit menu and select paste (command-v)
    another possible alternative it to use albums - make a new album and drag the photo to it - this saves disk space since the photo only exists once no matter how many albums you place it in - the albums simply reference the photo in the event
    LN

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

  • Can I use my iPod to copy files from one PC to another?

    I recently bought a Mac Powerbook and an iPod, and want to move all my personal stuff off my work laptop (an IBM ThinkPad) onto the Powerbook. Most of my files are photos, Word documents, excel files; only a few are music files.
    When I bought the Powerbook, the guy in the Apple shop said I could use my iPod like a hard disk to copy all the stuff over - using a flash drive would take forever!
    Was he right? If so, how do I do this? I can't seem to get past the fact that my iPod is now Mac formatted, which my IBM Thinkpad doesn't seem to like!
    MacBook Pro 2,1   Mac OS X (10.2.x)   i-Pod model MA446ZP

    How to use your iPod to move your music to a new computer using iTunes7
    http://docs.info.apple.com/article.html?artnum=300173
    How to use your iPod to move your music to a new computer using iTunes6
    http://docs.info.apple.com/article.html?artnum=304304
    Instructions above give the basic steps to use your iPod in disk mode so you can copy other stuff besides the itunes library.
    Patrick

  • Can I use Migration Assistant to Copy files from one mac to another, but not delete the original files off of the original Mac?

    I just purchased a new Macbook Pro Retina, and I have an old Macbook Pro w/o Retina and wish to use migration assistant. I still want to use the older Macbook Pro and keep all the files on it, but copy them and also put them on my new Macbook. What I'm trying to say is, can I use migration assistant to move files to a new Mac, while keeping the files on the old computer?

    You can omit some broad categories, but you can't pick and choose individual items.
    See Using Setup Assistant on Mountain Lion or Lion (preferred method), or the similar Using Migration Assistant on Mountain Lion or Lion for the gory details.

  • Problem in copying files form one disk to another in Mavericks

    I just upgraded to Mac X Mavericks and after suffering with an external disk that had been operating for years with no problem, I find thatthe process of copying files from one disk into another is extremely slow.
    Is the normal procedure that the copy is first prepared and then executed?. This is taking hours to copy a 100Gz file. Please help folks.

    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)

  • How can i copy files from one external hard disk to another using macbook pro with retina display

    How can i copy files from one external hard drive to another using macbook pro with retina display?

    That's odd - if you open Disk Utility (Applications->Utilities) and select the disk(s), how are they formatted? If you're only going to be used with your Mac, they should be formatted as "Mac OS Extended (Journaled)".
    Clinton

  • Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?

    Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?  The cut and paste function is not available and there's no "move to" function.  Am I missing something?  It was so easy with Windows.

    Drag the files, or press Option when pasting them; this accesses the Move To function.
    (124070)

Maybe you are looking for

  • How to delete Mail account without losing old mail?

    I've recently changed ISPs, so I have three old accounts/addresses in Mail that are no use any more. I want to delete them, but Mail (and Mail Help) tells me if I do I'll lose all the mail that has been sent or received from/by those accounts. I trie

  • Error Message in iBooks Author

    I am trying to export an .iba file made in iBooks Author to my computer but I am getting an error message saying that I need to check for space and permission. It is not a space issue as there is plenty of storage remaining. I am wondering if there i

  • How to use this query in oracle?

    Hi sir, i am using one query in sql that is declare @date date='2012-10-25', @date1 varchar(5) set @date1 = DATEPART(W, @date) print @date1 in that its returning value 5 means 25 oct day is thursday so it's checking and counting from sunday in that w

  • Create BP as a organizationa unit (BUP004)

    Hi, I need some urgent help. I need to create BP's for support teams.(SD, MM, FI  etc). I tried creating same via transaction code BP -->create --> organization. However under "Create in bp role" i cannot find the option BUP004 (Organizational unit).

  • Mail with 6MB attachments created a 69 MB Monster, up and down, no end!

    Yesterday I sent a mail with about 6 MB of data, I couldn't wait until mail did its usual play with stupid upload to .Mac, upload to draft, re-download to drafts again, re-download to sent messages and so on. Today mail does nothing but trouble, ever