Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying files via script

Status
Not open for further replies.

UNIX72

IS-IT--Management
Sep 8, 2000
403
US
Hello, im trying to copy a directory from one computer to the other, possibly through a batch file or script. The desire result, script will run at 12 midnight everyday and copy a directory from one computer to a different computer. Does anybody have any ideas or links, thank you all. Both computers are XP Pro
 
UNIX72,
very simple...
map a drive.
create copy.bat put code from below in and change where needed:
Code:
@echo off
copy /b *.* e:\pst\active\*.*
create a scheduled task to run copy.bat.
hth
regards,
longhair
 
copying a directory tree using a dos bat file
thread779-1077173

 
You can also use UNCs to do this without having any drives mapped

@echo off
copy /b *.* \\computername\sharename
 
I am curious why a binary copy was demanded in this instance:

As part of TurbottTTypeWE4's response above:

copy /b *.*
 
bcastner,
i originally posted with the /b. reason being that not enough info was given on what type of files were being copied - better to be safe than sorry (^o^).
i have a habit of always using /b since much of the work that i do involves both unix & windows/dos and a lot of edi. so i want to make sure that i keep every 'funky' character around.
regards,
longhair
 
Sorry for the late reply, but thanks for all your help! I have a quick question. How would i automatically run this script in Windows 98SE? Thanks who helps
 
UNIX72,
i believe w98 has scheduled tasks or the at command.

regards,
longhair
 
Hey longhair, thanks for your reply, but I'm having a syntax problem on the script. I just want to copy a file on a xp workstation to a MS 2003 Server on a daily basis. I already have a map drive (G:) to the server, so this is how my script looks. copy /b c:\project.mdb G:\public\project\ The script is not working, i know im missing something small. Please advise, thank you so much.
 
UNIX72,
rights to the server folder?
file is not open locally?
do you receive any error messages?
open the scheduled tasks folder, click on your task once, select advanced then view logs from the scheduled tasks menu - any entries?
 
Blank or empty password.
Running the task using a user not logged in anymore.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top