Script for copying or moving files from windows server to another remote windows server

Copy below 2 line into notepad and save as movescript.vbs
execute in command prompt
c:\cscript movescript.vbs  (Press ENTER)
Files will move to remote location.
=========================================
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\scripts\*.txt","\\servername\c$\share"
=========================================
for copy files to remote location
=========================================
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\scripts\*.txt","\\servername\c$\share"
=========================================
Lets us know if you face any error. reply back to me on [email protected]
Thank you.....
Regards Ravikiran MCITP

What is your question?  Are you asking how to do this?  Can you post the errors?
¯\_(ツ)_/¯

Similar Messages

  • Script for copy and compile objects from one schema to another

    Hi,
    I have 2 schemas like schema1 and schema2 in both schemas i have same procedures/function like p_test1 .If i modify a procedure in schema1 i want same modifications in schema2 so i want a script to apply these changes to schema 2.
    except bellow process  any alternative
      SET PAGESIZE 10000
      SET feedback OFF
      SET heading OFF
      SET echo OFF
      spool d:\SQL.OUT
       SELECT TEXT
        FROM USER_SOURCE
        WHERE NAME = 'MY_PROCEDURE';
      spool OFF
      SET echo ON
      SET feedback ON
      SET heading ON
    CONNECT OTHER_USER/OTHER_PASSWORD@OTHER_DATABASE;
    @d:\SQL.OUT

    All what you have to know about that function :
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_metada.htm#sthref3536
    Nicolas.

  • How to Copy an Image File from a Folder to another Folder

    i face the problem of copying an image file from a folder to another folder by coding. i not really know which method to use so i need some reference about it. hope to get reply soon, thx :)

    Try this code. Make an object of this class and call
    copyTo method.
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class FileUtil
    extends File {
    public FileUtil(String pathname) throws
    NullPointerException {
    super(pathname);
    public void copyTo(File dest) throws Exception {
    File parent = dest.getParentFile();
    parent.mkdirs();
    FileInputStream in = new FileInputStream(this); //
    Open the source file
    FileOutputStream out = new FileOutputStream(dest); //
    Open the destination file
    byte[] buffer = new byte[4096]; // Create an input
    buffer
    int bytes_read;
    while ( (bytes_read = in.read(buffer)) != -1) { //
    Keep reading until the end
    out.write(buffer, 0, bytes_read);
    in.close(); // Close the file
    out.close(); // Close the file
    This is poor object-oriented design. Use derivation only when you have to override methods -- this is just
    a static utility method hiding here.

  • Moving files from one drive to another

    How can I move a batch of files from one drive to another using Bridge CS4?

    There are two methods.  One involves your operating system and the other uses Bridge.
    Using Microsoft (sorry to you Mac users) have Windows Explorer open to the directory containing your files.  Click and drag the directory from one drive to another.  Conversely if you want to copy just a selection of the files follow this routine.
    Create a duplicate named directory in the destination drive.  Select the file you wish to move and do so from directory to directory.
    In Bridge it is even easier.  In Bridge ensure that the Folders sub pane is open and visibile.  Just click on the source directory and click and drag it to the destination drive.
    Testing on my part (I routinely move up to 30 gigabytes at a time) has demonstrated that Bridge adds a little time to the process depending on the size of the source files.  I suspect that this has to do with additional overhead of the program.
    To be safe I would recommend that you do use the copy method instead of moving the directory.  This is a failsae in case any problems crop up during the process.  It takes mere moments to delete the source directory after the copy routine has run.
    Wayne Webb

  • Best way to copy large VM files from one drive to another?

    Hi all, I am wondering what the best and fastest way there is to copy a large VM file from one drive to another (external drive to internal drive). Should the .pvm folder (in my case with Parallels) be zipped first? The files I need to copy range from 50 to 70gb. thx for any insight! ps. Even Bombich admits it's difficult for CCC to do...not clear why, but it does slow a full clone down to a crawl. I also have Chronosync at my disposal, but suspect the same is true there as well. Cheers!
    coocoo

    I don't think it matters much which way you do the job. I use Parallels to compress by drives on a regular basis. If you want to copy a dynamic VM, which can grow to just about any size as required, to another drive you will use about the same amount of time zipping the VM - transfering the VM - unzipping the VM, as you would just moving the VM.
    I've moved my VM files to a second partition that does not get cloned to my bootable backup that I create with SuperDuper. I've excluded my entire VM folder from Time Machine and just make zipped backups for each system after any large Service Pack Updates from Microsoft, or any intricate program installations. These get copied to a second partition on my Time Machine drive manually.
    My VM's sizes are kept under control by using common Documents-Movies-Music folders for the Mac and the VM's. My VM's do not have the data files the programs use, they are on my Mac and get backed up every hour with Time Machine.
    Reinstalling a VM just means deleting the broken copy, unzipping my latest backup, and putting into the same folder that Parallels knows to use. The data files are always accessible, even if they were created after my latest VM backup.

  • Computer freezes when moving files from USB, or to another partitioned HD

    Hello, i've been moving files from two USB's to my Macintosh HD, and when I do that, the computer kinda freezes up, i can move the cursor, but not kinda click anywhere, and then a minute after or something, it gets normal again, but the transfer is going horribly slow. this happens when i move from Macintosh HD, to Macintosh HD 2 (a partitioned one). the files are 2 gb each USB. which means im transferring 4 gb at the time.

    Neurot wrote:
    I have 6 folders on my hard drive. These folders were created by downloading a bunch of rar files, then extracting them each to their own folder. I have not touched the permissions, so they should be the default of me having read/write and everyone else having read (correct me if i'm wrong).
    Using two Finder windows, I drag and drop the six folders from one hard drive to another, and hold down the Apple key so that it moves instead of copies. I let go and it starts copying the files (since there is no "move", but rather a "copy and then delete").
    I would recommend you don't use this method to move a lot of files between drives. it's much safer first to copy and if the copy is successful to delete the original afterward. there was a data loss bug in OS X a while back that wold sometimes lead to total loss on both the source and the target when doing this.
    this bug is supposed to be long fixed but still...
    How is the hard drive you are moving the files to formatted? what yo describe sometimes happens when moving a lot of stuff to or from FAT formatted drives. also, repair both drives in disk utility. repair disk, not permissions.
    Message was edited by: V.K.

  • Can I copy a Backup file from one PC to another and use it?

    IPhone got all screwed up with the update on my home PC and wont restore, my PC at work does it fine, but my backup file is on my home PC. Can I copy my Backup file from my home PC and put it on my work PC to restore my IPhone?

    Before your restoring your iPhone with your PC at work, you can create a backup of your iPhone on the PC before restoring.
    With your iPhone connected and available in the iTunes source list, control click on your iPhone and select Back Up.

  • Moving Files from one project to another??

    New to Aperture ..and wondering is there an easy way to move files from one project to another? Or to move from one Album one project to another Album in another project if the Albums have the same name?
    thanks in advance,
    Steve

    schorney wrote:
    New to Aperture ..and wondering is there an easy way to move files from one project to another?
    Yes, simply drag-and-drop a thumbnail from a Project to another Project; or Option-drag-and-drop (one way copies the image, the other way moves the image).
    Or to move from one Album one project to another Album in another project if the Albums have the same name
    Although Albums can be located in Projects, Albums are really not "in" Projects as regards where the images come from. Each album is simply a virtual collection of pointers to images; the images pointed to can be located in multiple Project(s). So just drag-and-drop a thumbnail image from any project to an album to add a pointer for that image to that album.
    Although it seems complex it really isn't. Albums are a very powerful organizational tool with essentially zero overhead. Try it. Create some test albums in various ways just to see what happens and delete the albums when you are done. Since Albums consist of just "pointers" we can make/delete them at will for any reason.
    Note that Albums can be deleted with no warning message because Apple figures a simple collection of pointers is not that big a deal. Personally I think Album-deleting should have a (non-dire) explanatory warning message, because sometimes an album can consist of a complex collection of pointers.
    Multiple Albums should never have the same name.
    HTH
    -Allen Wicks

  • Moving files from one folder to another caused freeze

    I now have a list of files stuck in the center of my screen.
    I'm sure a reboot will fix this (I hope!) but I thought it was a bug worth reporting.
    All I did was move a copy a collection of files from one folder to another folder.  It made the "move" sound, and the files have been copied, but something clearly went wrong

    Have java.io.File objects pointing to the three folders. Get the list of all the files in the folder. Start a loop and check if the filename ends with Data.dat. If it is so then copy file to the final folder.
    To Copy file you can use any of the two approaches.
    1. You can read that file as byte stream (java.io.FileInputStream) and write it to the other folder as bytes (java.io.FileOutputStream).
    2. You can use shell commands to do this. (java.lang.Runtime.exe() method)
    Ali Ahsan

  • Moving files from one user to another

    Good afternoon all!
    In short I need to create a new user on a MacBook Pro running 10.7 (latest updates available as of this posting). However in the past when I have done this, when I moved the needed files (Photoshop actions, images, etc) over to the new user I kept getting permission errors which makes sense.
    So my question is simply, how do I migrate data from one user account to another while either modifying or fixing permission issues?
    Thanks!

    Copy all the data files into /Users/Share as the old user then log in as the new user and copy the files from /Users/Share to the home folder.

  • How can I copy a backup file from one computer to another?

    I want all of my app date, music, videos, ect to be on a new computer. Is it possible to back up my iPod Touch 3g on my old computer and copy the backup file onto the new computer? If so, how?

    Before your restoring your iPhone with your PC at work, you can create a backup of your iPhone on the PC before restoring.
    With your iPhone connected and available in the iTunes source list, control click on your iPhone and select Back Up.

  • Copy and past files from one place to another

    HI i am trying to back up few files from java program plz some one help me out. i am new to programming field.
    can i have a sample code so i can do my work easyli
    thanx yokivo.

    run this code and see:
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    public class CopyPasteFiles extends JFileChooser {
    boolean directoryOnly = false;
    public CopyPasteFiles(String who) {
    if (who == "directoryOnly")
    directoryOnly = true;
    else
    directoryOnly = false;
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    this.setBounds(new Rectangle(8, 8, 583, 482));
    this.setDialogTitle("Select a file");
    if (directoryOnly == false) {
    this.setFileSelectionMode(JFileChooser.FILES_ONLY);
    this.setApproveButtonText("Backup it!");
    else {
    this.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    this.setApproveButtonText("Select it!");
    public boolean implementBackup(File origin, File destination) {
    boolean backup = false;
    if (origin != null && destination != null) {
    String path = origin.getPath();
    try {
    FileInputStream origin1 = new FileInputStream(origin);
    File back1 = new File(destination.getPath() + File.separator + path.substring(path.lastIndexOf(File.separator)+1));
    back1.createNewFile();
    FileOutputStream back2 = new FileOutputStream(back1);
    byte[] bytes = new byte[origin1.available()];
    origin1.read(bytes);
    back2.write(bytes);
    origin1.close();
    back2.close();
    back1 = null;
    catch (Exception err) {
    System.out.println("File Error: " + err.getMessage());
    backup = true;
    return backup;
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception err) {
    System.out.println("General Error: " + err.getMessage());
    err.printStackTrace();
    CopyPasteFiles copyPasteFiles1 = new CopyPasteFiles("fileOnly");
    int returnValue1 = copyPasteFiles1.showOpenDialog(copyPasteFiles1);
    File directorySelected = null;
    File fileSelected = null;
    if (returnValue1 == JFileChooser.APPROVE_OPTION) {
    fileSelected = copyPasteFiles1.getSelectedFile();
    boolean isDirectory = false;
    while (isDirectory == false) {
    CopyPasteFiles copyPasteFiles2 = new CopyPasteFiles("directoryOnly");
    int returnValue2 = copyPasteFiles2.showOpenDialog(copyPasteFiles2);
    if (returnValue2 == JFileChooser.APPROVE_OPTION) {
    directorySelected = copyPasteFiles2.getSelectedFile();
    if (directorySelected.isDirectory())
    isDirectory = true;
    else
    isDirectory = true;
    boolean isBackup = copyPasteFiles1.implementBackup(fileSelected, directorySelected);
    int messagebox = 0;
    if (isBackup == true)
    messagebox = JOptionPane.showConfirmDialog(null, "Backup: YES.", "Caution!", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
    else
    messagebox = JOptionPane.showConfirmDialog(null, "Backup: NO.", "Caution!", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
    System.exit(0);

  • Copy Time Machine files from one disk to another: error 50

    I have a 500GB disk used with TM, and bought a 1TB disk. I tried to copy the TM folder from the 500GB disk to the 1TB so that the larger disk could take over as my main backup.
    However, when I copied the TM folder, it gave this error message:
    "Sorry, the operation could not be completed because an unexpected error occurred (error code -50)"
    Tried twice, with same error message.
    Any suggestions as to how I can copy the TM folder from one disk to the other, without getting this error message?

    Try this program called superduper! http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html the trial version should allow you to do what you want. I used this to back my time machine back to my mac and then back to the disk again so that I could delete and resize it. If it doesn't work at first try turning off time machine while copying and deselecting it as the TM drive.

  • How do I open music after moving files from 1 drive to another?

    I ran out of disk space on my C drive. The computer is partitioned w/ C & D drives. I moved all itunes folders to the D drive and cannot open the music. I went to advanced and redirected to the D drive and appropriate file without any luck.
    Signed
    Tuneless

    Hold down the Shift key in Windows when opening iTunes. In the resulting dialogue you will get the option to create a new library or navigate to an existing one. Navigate to where you placed the copy of the library file and open it up: How to open an alternate iTunes Library file

  • Moving files from one partition to another

    I originally posted this in the Mountain Lion section, but maybe this is where I should have tried first.
    I have  a song in the iTunes library of the Snow Leopard side of my Hard Drive. It plays well. However, I want to move it to the Mountain Lion side of my Hard Drive. The problem is, it doesn't play very well there; in fact, it's more like static and screech than a song. I recorded it with an older version of iTunes and in the Snow Leopard environment, but I want to move it to the latest version of iTunes in the Mountain Lion side of my Hard Drive.
    I thought I had solved the problem. I played the song and recorded it again using WireTap Studio (a sound recording and editing program). I then mailed it to myself, and I opened it in the Mountain Lion partition. Unfortunately, although I had expected that to do the trick, the song file I opened in Mountain Lion was just as bad as before. What else can I try? I had thought of burning the song into a CD  in the Snow Leopard side and then moving it to my Mountain Lion side using WireTap Studio again. Would that work? If not, what can I do?
    iDVD 7.1.1 (1150) 

    I've been spending a great deal of time trying to get the definitive answer, but I keep running into things I just don't understand; nevertheless, I couldn't find any differences between the recordings that make them sound so different. I looked at many song files, but I'll just mention some  in the notes I have at hand.
    (1) Recording from YouTube (The quality is fine): 4.9 MB, 128 kbps, MPEG aud., 44,100 kHz
    [This is about the same as the recordings I have in Snow Leopard that could be transferred to Mountain Lion without loss of quality]
    (2) The recording that sounds great in Snow Leopard but terrible in Mountain Lion: 8.8 MB, 173 kbps, MPEG aud., 44,100 kHz.
    When I tried using VLC, the following message appeared on my screen: VLC Media Player cannot open files in the MPEG audio layer 3 format. I might add that when I tried "right-clicking," I was given the choice of at least ten programs (Flip, Quicktime, RealPlayer, iTunes, etc., but none that I tried were useful (I still haven't tried the high-powered "safecracking" programs I have somewhere. 
    That's it for me today. I don't want to say how much time I've already spent on this, but I'm exhausted, so I'm heading for the gym. Bench presses are easier on the system.

Maybe you are looking for

  • How can I get the View Tab name on the Crystal Report Viewer at runtime?

    When a report is displayed in the Windows Forms Crystal Report Viewer and the user drills into the report, the drill down view is displayed in a seperate view and is identified via a View tab at the top of the report.  I can determine the index of th

  • Customer Consignment QI or Restricted

    Hi We're implementing the customer consignment solution but we've noticed that there is no blocked status for customer consignment stock.  The status we have to choose from are 'customer consignment quality inspecition' and customer consignment restr

  • Redirection of expired message to error destination topic.

              We are using weblogic 7.0 for JMS. We have two topics topic A and topic B. When           a message gets expired in TopicA, we want this to be redirected to an error destination           that is configured to Topic B. This is not working f

  • FM to update delivery details LIKP-BTGEW and LIKP-ANZPK

    Hello All, Can anyody please tell me a fucntion module to update the fields LIKP-BTGEW and LIKP-ANZPK. I have checked BAPI_OUTB_DELIVERY_CHANGE and WS_DELIVERY_UPDATE. Both these FMs are not having these fields. Request you to please help me out.. Re

  • MSI GX620 Cooling Problems

    hello everyone! i bought my MSI GX620 notebook at christmas and till now everything worked really fine. about a week ago i noticed that games,after running about 15-20 minutes, start to run slower, feels like fps would drop around 20. my first though