cmd file to backup other files in the background

S

Some Dude

I need a batch file / cmd file that I can run as a scheduled task to back up
files from a folder on my C drive to my server drive. I run a screen scraper
and I don't know of any way to do this without a window popping up on the
screen and messing up my screen scraper. The screen scraper doesn't run all
day but it's enough to be a problem. Can someone tell me of a way to make my
cmd file run without popping up in a window?
 
M

Michael Bednarek

I need a batch file / cmd file that I can run as a scheduled task to back up
files from a folder on my C drive to my server drive. I run a screen scraper
and I don't know of any way to do this without a window popping up on the
screen and messing up my screen scraper. The screen scraper doesn't run all
day but it's enough to be a problem. Can someone tell me of a way to make my
cmd file run without popping up in a window?

Doesn't this run the cmd file minimised:
START "" /MIN cmd /c d:\dir\batch.cmd

However, if you use NTBACKUP to perform the backup, it will always pop
up on the screen. Use a command line method instead, like copy, xcopy,
robocopy.
 
Joined
Jul 25, 2006
Messages
2
Reaction score
0
VBS Backup Script

Set objBrowser = CreateObject ("InternetExplorer.Application")
With objBrowser
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Width = 600
.Height = 100
.Visible = 1
.Document.Title = "Backup in progress - please be patient"
.Document.Body.InnerHTML = "My Documents are currently being backed up." & vbCr & "This may take several minutes to complete."
End With

'Do the copy routine here, then...

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("cmd /c xcopy C:\MyDocu~1\*.* i:\Bawa /s/c/d/k/y "),0,True


objBrowser.Document.Body.InnerHTML = "Your My Documents Backup is now complete."

WScript.Sleep 2000 'Value in Miliseconds

objBrowser.Quit 'Close Browser Window

WScript.Quit



'u can delete the browser message and well this is not a scheduled backup. i have put this script in the group policy or on the user startus folder
 
Joined
Jul 25, 2006
Messages
2
Reaction score
0
Set objBrowser = CreateObject ("InternetExplorer.Application")
With objBrowser
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Width = 600
.Height = 100
.Visible = 1
.Document.Title = "Backup in progress - please be patient"
.Document.Body.InnerHTML = "My Documents are currently being backed up." & vbCr & "This may take several minutes to complete."
End With

'Do the copy routine here, then...

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("cmd /c xcopy C:\MyDocu~1\*.* i:\Bawa /s/c/d/k/y "),0,True


objBrowser.Document.Body.InnerHTML = "Your My Documents Backup is now complete."

WScript.Sleep 2000 'Value in Miliseconds

objBrowser.Quit 'Close Browser Window

WScript.Quit



'u can delete the browser message and well this is not a scheduled backup. i have put this script in the group policy or on the user startus folder
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top