Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Create a batch file to save files from network to local computer  (Read 2904 times)

0 Members and 1 Guest are viewing this topic.

scanman

  • Guest
Create a batch file to save files from network to local computer
« on: November 19, 2007, 09:41:02 AM »
I made a .bat file that seems to do the first stuff correct, but when it comes to finding the network stuff it just can't. Really new to this so be gentle.

This is the code I used...

mkdir D:\BATCH_BACKUPS\PC-DMIS\PROGRAMS

xcopy X:\PCDMIS PROGRAMS\212 LAYOUT PROGRAMS *.* D:\BATCH_BACKUPS\PC-DMIS\PROGRAMS/y/e

Thanks for any help. If more info is needed please ask me.

Spoiler



    Specialist

    Thanked: 50
  • Experience: Beginner
  • OS: Windows XP
Re: Create a batch file to save files from network to local computer
« Reply #1 on: November 19, 2007, 10:47:16 AM »
mkdir D:\BATCH_BACKUPS\PC-DMIS\PROGRAMS


If the directory called programs is all ready there than you don't need to do this everytime you run the bat file. make it once and call it a day.

xcopy X:\PCDMIS PROGRAMS\212 LAYOUT PROGRAMS *.* D:\BATCH_BACKUPS\PC-DMIS\PROGRAMS/y/e

Do you have a network mapped drive called X? Or are you trying to create it when you run the bat file? I think what your after is something like this...


net use X: "\\YOUR SERVER\THE SHARE NAME\*.*" /PERSISTENT:NO

xcopy "X:\PCDMIS PROGRAMS\212 LAYOUT PROGRAMS\ *.*" D:\BATCH_BACKUPS\PC-DMIS\PROGRAMS\*.* /y/e

You may also want to post this in the dos forum.




Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer

scanman

  • Guest
Re: Create a batch file to save files from network to local computer
« Reply #2 on: November 19, 2007, 11:01:56 AM »
Thanks Spoiler, I will try this later today.