Need a BAT or script to copy a folder from a local drive to the se

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Local machine OS = WinXP, SP2
Server OS= Win2K

I have to create a BAT or script file that will copy ONE folder (and ALL of
the files within it) to the server. BTW, which would be better, a BAT or a
script?

The paths for these will not change, with the exception that the new folder
on the server will have an underscore and the current date (in this format
05-03-06) appended to the folder name from which came from the C: drive.

Here is the path for the C: drive folder:

C:\BB

Hence the folder name is BB.

Here is the intended path for the copied BB folder to go to:

X:\Data\Backup\Local_Drive

Now as I said earlier, I need the BAT or script to make a new folder on the
server path X:\Data\Bayou_Brule\Local_Drive path named:

BB_05-03-06 (The appended portion would be the underscore and the current
date)

If the format of the current date needs to be different to make the BAT or
script work, that's OK with me.

And is it possible to to make the BAT or script run everyday WHEN I log off?
Or I should I manually execute the BAT or srcipt with a shortcut?

If there is anything info missing that you need to know, let me know and I
will respond immediately.

Thanks,

Phil.
 
See http://msdn.microsoft.com/scripting Download the documentation for VB Script and the Windows Script Host. You're primarily interested in the FileSystemObject. Note: Most current antivirus products consider script access to the file system as a potentially malicious activity.
 
Doug,

Thanks for your reply. I tried the first link you attached (for scripting)
and it didn't work. I finally was able to get to the scripting page
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/scriptinga.asp)
and read through it a bit, and am realizing that it is a little more in-depth
than I have the time to investigate. So unfortunately, I can't utilize that
particular resource at this time, due to my time constraints.

But I do apprieciate your repsonse, and maybe later when I have some spare
time I will try and give it a go.

However, if anyone would like to offer some more input on either writing a
BAT or script, I WOULD GREATLY APPRIECIATE IT!

Regards,

Phil.
 
Phil wrote :
I have to create a BAT or script file that will copy ONE folder (and ALL of
the files within it) to the server. BTW, which would be better, a BAT or a
script?

The paths for these will not change, with the exception that the new folder
on the server will have an underscore and the current date (in this format
05-03-06) appended to the folder name from which came from the C: drive.

Here is the path for the C: drive folder:
C:\BB

Here is the intended path for the copied BB folder to go to:
X:\Data\Backup\Local_Drive

Now as I said earlier, I need the BAT or script to make a new folder on the
server path X:\Data\Bayou_Brule\Local_Drive path named:

BB_05-03-06 (The appended portion would be the underscore and the current
date)

If the format of the current date needs to be different to make the BAT or
script work, that's OK with me.

And is it possible to to make the BAT or script run everyday WHEN I log off?
Or I should I manually execute the BAT or srcipt with a shortcut?

xcopy c:\bb X:\Data\Backup\Local_Drive\BB_%DATE% /e /i /q /h /r /y

see "xcopy /?" in a command prompt for details of the swithces used
above.

To execute the BAT when you log off, add it to the logoff script in the
local computers Group Policy. Click Start-Run and type gpedit.msc and
click Ok. See this link for details re logoff script:
http://www.snugserver.com/phpbb2/viewtopic.php?t=1411&start=0&postdays=0&postorder=asc&highlight=



/klaus
 
Phil said:
Hello,

Local machine OS = WinXP, SP2
Server OS= Win2K

I have to create a BAT or script file that will copy ONE folder (and ALL of
the files within it) to the server. BTW, which would be better, a BAT or a
script?

The paths for these will not change, with the exception that the new folder
on the server will have an underscore and the current date (in this format
05-03-06) appended to the folder name from which came from the C: drive.

Here is the path for the C: drive folder:

C:\BB

Hence the folder name is BB.

Here is the intended path for the copied BB folder to go to:

X:\Data\Backup\Local_Drive

Now as I said earlier, I need the BAT or script to make a new folder on the
server path X:\Data\Bayou_Brule\Local_Drive path named:

BB_05-03-06 (The appended portion would be the underscore and the current
date)

If the format of the current date needs to be different to make the BAT or
script work, that's OK with me.

And is it possible to to make the BAT or script run everyday WHEN I log off?
Or I should I manually execute the BAT or srcipt with a shortcut?

If there is anything info missing that you need to know, let me know and I
will respond immediately.

Thanks,

Phil.

Why reinvent the wheel? A free program that can do that is Karen's
Replicator available at karenware.com

I use it to keep files backed up and current on three computers on my
home network. You can customize it easily.
--
Gerald Ross
Cochran, GA

Whatever temperature a room is, it's
always room temperature.
 
Back
Top