Automic Workload Automation

  • 1.  Copy files to local system from shared drive on network

    Posted Dec 22, 2015 02:21 PM
    Hi,

    I am trying run a batch file which copies file from local machine to our shared drive but getting below error message,
    "The system cannot find the drive specified"

    Here is my batch script where z is the shared drive,
    copy E:\Test\Test1.txt z:\Test1_%date:~10,4%%date:~4,2%%date:~7,2%.txt
    Also this is working fine when I run it through command prompt.

    Is there a way to copy file to shared drive?

    Thank you in advance.


  • 2.  Copy files to local system from shared drive on network

    Posted Dec 23, 2015 03:43 PM
    Hi Himanshu,

    If you are copying the file to the share, you will need to use the UNC path of it.

    For example I did something like this:

    copy C:\temp\TEST1abc.txt \\vwafs01\COMMON\lul\test_%date:~10,4%%date:~4,2%%date:~7,2%.txt"

    On my machine I have a share drive with a path of: H:\lul
    But the UNC path for it is:  \\vwafs01\COMMON\lul


  • 3.  Copy files to local system from shared drive on network

    Posted Dec 23, 2015 04:00 PM
    Hi Luu,

    It worked with UNC path when I used it with quotes "\\UNC path"

    Thanks so much!!! :)

    -Himanshu