system.callSystem with xcopy

Hey guys,.

I'm trying to copy a directory from one location to another using system.callSystem with the xcopy command. I tested the string that I use as a parameter directly in the command prompt and it works, so I know I'm feeding the function correctly. However, when I run it, nothing happens. Any ideas what could be going wrong? Is there something that I am missing?

Here's the call:

system.callSystem ("xcopy" ' + sourceDir + '-*. * "/ e" "+ targetDir + '"');

This string, I'm animals is the equivalent of

xcopy '\\SOURCE_NETWORK\SOURCE_DIRECTORY\*.*' / e '\\TARGET_NETWORK\TARGET_DIRECTORY '.

I test your code in AE CC 2014 and failed too. Perhaps scripts have no direct xcopy permission. Try the next method.

/*

callStr = "xcopy" ' + sourceDir + ' \ *. "" ' * ' / e ' "+ targetDir + '" "';

system.callSystem ("cmd.exe /c \""+callStr+"\"" ");

*/

It works fine now. If the system.callSystem () do not correspond to cmd.exe in fact.  You must call the cmd.exe in this method.

However, at least we can directly use "Explorer" to address the same goal. Just save the chain of command as a * cmd file. After you run the temp by call "Explorer" file, delete it.

Here is the code:

/*

callStr = "xcopy" ' + sourceDir + ' \ *. "" ' * ' / e ' "+ targetDir + '" "';

outFile = File("~/Desktop/tempCmd.cmd");

outFile.open ("w");

outFile.write (callStr);

outFile.close ();

system.callSystem ('explore' + outFile.fsName.toString ());

outFile.remove ();

*/

The difference of the two methods. The first method shows the string that you call in cmd interface, while the second method not.

Moreover, it seems that relative path not working with xcopy, so make sure you convert the souceDir and targetDir absolute path.

Tags: After Effects

Similar Questions

  • When we try to use our multipoint system 2010 with more than 2 users the mouse around the screen to move.

    Original title: problems using multipoint server 2010.

    When we try to use our multipoint system 2010 with more than 2 users mice become uncontrollable and move the screens themselves. How to fix this.

    Hi thomasgk,

    The issue of Windows Multipoint Server 2010, you have posted is better suited for the IT Pro TechNet public. Please ask your question in the TechNet forums for assistance.

    Hope the helps of information.

  • I get system off with the code 68072590 after 3 failed attempts

    I get system off with the code 68072590 after 3 failed attempts

    AM trying.

    77950516

    Use this code to go into the BIOS.

    Disable all passwords that are enabled.

    IF demand for CURRENT password using this code.

    REQUEST NEW password just press ENTER.

    If asked to hit just to CHECK password to enter.

    Save and exit.

    REO

    I must inform you that these services are not endorsed by HP, and that HP is not responsible for any damages that may occur to your system using these services. Please be aware that you do so at your own risk.

  • Error 'System restore running system' starts with a black cursor screen while trying to use the system restore

    Original title: unit hanging in the middle of the restoration of the system

    Message "System restore running system" starts with a black screen with cursor, but does not move forward.  Windows Vista question

    Have you tried F8 solutions and when I select the system restore it gives me the message above and goes to the black screen even ugly.

    How did I break the loop so I can start a new system restore?

    Hello

    Are you trying to restore your computer or you try to create a restore point?

    Step 1 or 2 can help you to restore your computer.

    Step 1: Try the steps in the section below, if you haven't tried it.

    Start the restore of the system from a command prompt
    http://Windows.Microsoft.com/en-us/Windows-Vista/Start-System-Restore-from-a-command-prompt

    Step 2: Try restoring the system from the recovery console.
    Reference: http://windows.microsoft.com/en-US/windows-vista/What-are-the-system-recovery-options-in-Windows-Vista

    Step 3: Also, look for error messages in the event viewer. If you find error messages after return the exact error message so that we can help you better.

    Measures to check the application event log:

    a. Click Start.
    (b) in the search box type eventvwr.msc, and then on enter.
    c. now, click Application in the event viewer (local).
    d. now, looking for event log on the right side of the event viewer window.
    http://Windows.Microsoft.com/en-us/Windows-Vista/open-Event-Viewer
    http://Windows.Microsoft.com/en-us/Windows-Vista/what-information-appears-in-event-logs-Event-Viewer

    Similar problem: http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/system-restore-wizard-is-already-running/c797baf7-c069-4e3a-894a-e9644cc6df0b

  • Version of the operating system incompatible with Startup Repair tool

    I'm trying to reimage dell inspiron 1525. Operating system is Windows Vista. Error received halfway through restoration. Has been reduced to system recovery options. Startup Repair has chosen to be tell version of operating system incompatible with Startup Repair tool. Now I cannot do anything else.

    Hello
     
    1. you use the correct version of the Vista disc to run Startup Repair?

    2 you also all error messages /codes when you startup repair?
     
    I suggest to run the diagnostic tool memory WINRE mode and check if the memory (RAM) installed on the computer works fine.
     
    Follow the steps below to start the computer using the WINRE and run the memory diagnostic tool.
     
    a. Insert the Windows Vista installation disc.
    b. restart your computer.
    c. If prompted, press any key to start Windows from the installation disc.
     
    Note: If your computer is not configured to start from a CD or a DVD, see the documentation provided with your computer. You may need to change your computer's BIOS settings. For more information, see BIOS: frequently asked questions.
     
    d. choose your language settings, and then click Next.
    e. click on repair your computer.
    f. Select the operating system you want to repair, and then click Next.
    g. on the System Recovery Options menu, select the memory diagnostic tool.
     
    Once scanning is complete, check to see if the problem is resolved.
     
    Access the link below to learn more about Windows recovery options in Windows Vista.
     
     
     
    If you have several sticks of RAM installed on the computer, you can try to remove one of the RAM stick and check if it works very well. Also, you try to exchange the RAM sticks and check if one of the RAM is originally this issue and if it needs to be replaced.
     
    Note: If you are not aware of the evolution and swaping the stick of RAM on the computer, it is best to contact the computer manufacturer for help on this and you can do it at your own risk.
     
    You can also contact Dell support and check if you need to replace any hardware.
     
    Aziz Nadeem - Microsoft Support
  • How to do a system restore with windows 8. my mouse is not working but the keyboard works

    How to do a system restore with windows 8. my mouse does not work but the keyboard works.

    I've updated some drivers and now my mouse does not work

    Press the Windows key and press 'R '. Type "appwiz.cpl" without the quotes in the box run. Use the arrow keys to scroll down for updated drivers. When the driver is highlighted Press 'enter '. Use the arrow keys to select Yes in the uninstall confirmation dialog box. Restart the computer.

    You can run the restoration of the system from a command prompt if you are unable to uninstall the drivers. Press the Windows key and 'X', use the arrow keys to select the type of command (Admin) line "rstrui.exe" without the quotes. Use the arrow keys to navigate the windows system restore.

    Jim

  • Hello, I have pls message system disabled with the 68301454 code. What should I do?

    Pls how to fix a blue box with the message "system disabled" 68301454.

    Hello:

    Enter the unlock code...

    77069490

  • Problem of satellite L850 - warning system - one with the cooling system

    My L850 Satellite has a future warning system
    "WARNING: a problem with the cooling system has been detected."

    Please, turn off computer immediately and return it for service. »
    Is this a known glich or should I take it back to the store
    The lappy is only 4-5 months out of the box.

    In my opinion you should not waste your time to discuss in the forums. Laptop is fairly new and should work just fine, so my opinion is that you should contact your dealer or supplier of Toshiba service directly and ask for help.

    Do you know how to find the nearest Toshiba service provider?

  • How do I know if my system came with built in wifi

    I've never used wifi on my desktop computer. I was told that the new HP desktop computers came with built-in wifi and if it was in airplane mode, it wouldn't work. I tried to find this setting but to locate the search on my system. How can I find out this information to see if mine has built-in wifi.

    Hello

    The following link shows the specifications of your machine:

    http://support.HP.com/us-en/document/c03520552

    There is NOT a wireless. I didn't have ANY housing PCI or PCIe spare for a PCIe wireless card so an option that you can try to use something like the following:

    http://www.OfficeWorks.com.au/retail/products/technology/Networking/Wireless-USB-adapters

    Kind regards.

  • Complete installation detail 8 Win Pro on a Lenovo system provided with Win 8 Standard/Core

    Hello

    So I have a Thinkpad Twist supplied with Windows 8, and I am trying to reinstall Windows 8 Pro on. I have a copy of win 8 OEM Pro and I don't want to buy the upgrade, since I already have the full version. I want to put this machine on a field in my test harness and can't do that running Windows 8 Pro.

    So, I booted from a USB DVD and installed the operating system, but once it was installed, I noticed that it was still the standard 8 Win. So I tried again, with the same result. When I reinstall it I am partitioning and formatting all two by car on the twist, so I don't know why, it's back to standard Win 8. Also when I install Win 8 Pro he never asks me a key, so something is strange, and it shoots this info to win 8 old standard somewhere.

    I went into the BIOS and noticed there is some security settings to avoid you to install a new OS. So I've disabled all the people and tried to install it again with the same result. I don't understand.

    Anyone know how to completely clean the discs so that I can just do a clean install of Windows 8 Pro? Or what are the settings that I need to change in the BIOS so that he can let me do a new installation? I worked on it for more than 8 hours... start pulling my hair.

    Any info would be greatly appreciated.

    Thanks for the input guys. I ended up finding the solution here...

    http://support.Microsoft.com/kb/2796988

    I had to perform an unattended installation that replaces the product key embedded in the Flash of the BIOS.

  • Specimen of Positioning System blower with Galil controller

    Hi all

    So to say the least I am super frustrated with my LabVIEW program right now. This project requires that I use only of LabVIEW and GalilTools software, so I can't use C or C++ or any other person. I wrote about what the code I need would look like in C/C++, but I'm having a lot of trouble to create a LabVIEW program that does the same thing. I have attached the VI I've written so far. I have also attached my operating scheme to help understanding outside of my intentions. Also attached an OpsManual dictates the structure of my interface planned and everything that it should do.
    I know there is much to look at, but I'd be very happy to help. I've looked everywhere on the examples and the forums and youtube tutorials and I'm just really having trouble, and this particular stage takes too long.

    The basis for this project is that it is a positioning system managed by 2 stepper motors with angular limits specified. All engine configurations is processed by the GalilTools software. The logic must be managed in LabVIEW. This requires the adoption of values in both directions between LabVIEW and the controller.

    I'm doing some specific things are currently doing me wrong:
    -the output messages back as program at each stage movements (LabVIEW not spend several channels to the same Terminal without other things in between, I have not yet found a way)

    -Connect the wires of the reference and error programmatically (I understand this is how the program passes the values and it also affects the operation of the program, I'm not sure how to connect a mine and have my program still works as expected, also runs the question of having several wires to a terminal that LabVIEW won't)

    -emergency stop button (I need this cable in so that it can stop the program at any time, similar to the demolition)

    There are many other issues that will arise as I move forward, but those are the current, I worked on that. I'm fighting with which structures should be used. It's just not quite as intuitive for me like C/C++ has been.

    Thanks in advance for any help provided.

    A few thoughts for you to consider.

    The Galil aspect

    • You do not need to download your Galil program every time, connect using Galiltools or GalilSuite and download and then use the BP command to burn the program in memory.
    • Put anything in #AUTO which must be executed each time the controller is running.
    • Operation most have a complementary _cmd operand that can be queried. IE: BGA will start movement on axis 1, MG _BGA returns 1 if still in motion, or 0 if the request is completed.

    For the side of LabVIEW

    • Replace the case separated by a single event structure structures. Given any how do you now without delay in means of the loop that you run each of these cases as soon as your program can.
    • Get rid of all calls to Galil outside the structure of the event. If you wish to check the status or the movement of code, put it in the case of timeout or consider another loop that runs independently of your main loop.
    • Keep in mind the operation of the son, means anyone to load data only if two sons are in a structure or function they both must contain data before the structure or even runs. Other you can make threads where you need.
  • Pavilion: I forgot my password BIOS administrator and get 'system disable' with '85379569' Please help me

    .

    Hello:

    Please read the first post on the link below for what to do with the system off (halt) code given by the PC.

    http://h30434.www3.HP.com/T5/notebook-operating-Sy...

  • System Restore (with backup) for Windows XP how to restore the files from here?

    I saw the other posts for this but they have not answered the question. When I look in the C drive, and open the folder backup (backup C:\My--01/12/23 1134 AM), my photos, videos and documents are not available or are invisisble. When I tried to make hidden files visible, all my desktop icons and all the Start Menu program buttons disappear. I can see the files when I search with a software such as jdiskreport - 1.4.0, but I'm unable to move with this program. When I tried to move them with jdisk... they is locked in the tree of files of jdiskreport. Whenever these trees of missing or file icons has locked, I had to restore to the good previous restore point. In my view, the full restoration of the system (with backup) fails and should be avoided at all costs.

    So, if someone knows a way to access these files, I would appreciate the help of course. And please, no answers don't like "cannot not you just copy and paste?" because it is not currently a solution until the files are visible without erasing my desktop and the Start Menu.

    Hello

    Select the advanced restore options to restore the files. See the steps in the following article.

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/restore_overview.mspx?mfr=true

  • Stat of the system upward with the error: Exception Processing Message c0000013 parameters 75b6bf7c 4 75b6bf7c 75b6bf7c

    Original title: Getting a weird error message. Seems to be the floppy driver.

    Hello. This problem everything seems to start when I changed my drive letters. Finally, I think it points to my floppy drive A.

    I get these error messages when I start my computer. Windows tells me this: No. disc: "treatment of Message of Exception c0000013 parameters 75b6bf7c 4 75b6bf7c 75b6bf7c". It happens about 8 or 9 times then goes away.

    I have several internal hard drives, 2 optical drives, A floppy drive, a card reader and a printer. I decided to shift the drive letters down after hard drives since I have recently installed a dual-boot and needed earlier letters to the editor. The problems started before the dual-boot has been installed. Changed this example of drive letters: g-i, h-> j > I-> k, etc. The main readers have remained the same.

    I uninstalled the floppy drive and the controller, Windows re - installed after re-booting of course.

    I disconnected Ribbon floppy motherboard and the power supply. The messages stopped. I then uninstalled the floppy drive and the controller in Device Manager. I reconnected it A floppy Ribbon and power, loaded windows reinstalled the drivers and then gave me the error emssages once again.

    I have a DVD of Windows XP Home Edition 32 bit SP3. Telling me to do a repair isn't the best idea, because nobody has explained how it works. When the DVD goes in the car or at the start: there is no repair function.

    Thank you.

    If you don't see a message like this:

    No disk, Exception Processing Message c0000013 parameters 75b6bf7c 475b6bf7c 75b6bf7c

    Until you can determine what the 'real' problem is with your hardware, you can disable the pop-up message by making a registry adjustment.

    Before making changes to the registry, back up your registry with this free and easy to use tool popular:

    http://www.SnapFiles.com/get/ERUNT.html

    Click Start, run and enter in the box:

    Regedit

    Click OK to open the registry editor, navigate to the following key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows

    In the right pane, check the value of the ErrorMode setting.

    If ErrorMode is set to 0, double click on ErrorMode and set 2 (2 = disabled).

    Click OK to save the changes, and then click file, exit to close the registry editor.

    Reboot your system and check the things now.

    2 to the parameter ErrorMode stops at pop - up message but still material error log in the Event Viewer log.

    Learn more about it here:

    http://support.Microsoft.com/kb/124873

  • When tried to install a program using the CD, the system restarts with a blue screen

    Original title: Running XP Professional, software installation problems

    I am running XP Prifessional, (on a common (i Mac) with Intel dual owner.)  When I try to install new software (from a CD), when the Installer starts up I get a "blue screen" for a moment, the system is restarted.  Even when I go into the control panel of the installation program does the same thing.  Installation CD runs on the Mac side.

    Hi PHiday,

    1. you see an error on the screen?
    2. what program are you trying to install?

    Step 1: We recommend that you copy the contents of the CD to a folder on the desktop and then try to install the software. To do this, try the following steps:
    a. Insert the CD into the CD/DVD drive.
    b. Click Start, click my computer.
    c. right-click on the CD/DVD drive and click Open.
    d. Select the folder or the installation file and copy.
    e. right click on the desktop and click New-> new folder.
    f. in the new folder, right-click and click on paste.
    g. once the program is saved, open the installation file and continue with the installation and check if the problem persists.

    Step 2: If the problem persists, check the event logs and back view details
    see How to view and manage the event logs in in Windows XP Event Viewer .

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for