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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

very basic batch file

Status
Not open for further replies.
Oct 8, 2002
62
US
If there's any place that can help me it's tek-tips


I have no clue how to write scripts but i know what you can do with them.

I need help with moving files from one network folder to another. I tried batch file but can't seem to figure out the correct syntax if anyone can help thanks in advance.
 
And what have you so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I use robocopy for copy stuff, it's freeware and you can find it on a windows 2003 cd. Here is an example:


et WSHShell = CreateObject("WScript.Shell")
wshshell.run "C:\Windows\robocopy.exe " & chr(34) & "C:\Program Files\Folder Name" & chr(34) & " " & Chr(34) & "D:\BACKUP IMPORTANT\Program Files\Folder Name" & chr(34) & " /MIR /TEE /W:10 /R:3 /LOG:C:\LOGFILE.TXT
 
Just for iNfAmOuSeNiGmA 's sake, utilman missed a leading charcter while pasting. Use Set in the first line.
et WSHShell = CreateObject("WScript.Shell")

Should read
Set WSHShell = CreateObject("WScript.Shell")

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
personally i'd use a batch file

xcopy C:\file\to\be\copied.exe E:\location\of\where\you\want\it.exe
 
Personally I'd write a script to do it so that I could handle errors properly.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top