Add a comment. Active Oldest Votes. Improve this answer. Nae Johnny Bones Johnny Bones 8, 6 6 gold badges 40 40 silver badges bronze badges. Yaugen Vlasau Yaugen Vlasau 1, 1 1 gold badge 15 15 silver badges 35 35 bronze badges. Both solution above are correct. Sign up or log in Sign up using Google. Sign up using Facebook. I've got the backup working but want to use it as a daily backup of one drive to another. What do I need to do to replace the previous day's backup?
Using this option allows you to update the backup directory only with files that have changed since last time you ran it rather than copying all files. I hope this helps. Please direct any further questions to our forums. HI, I was in bad need of creating a batch file for backup and the script you have given in the website has really satisfied my requirement.
Thanks for the help. Regards, Ravi Verma Vegesna. Hi guys, i'm having trouble figuring out how to create one script that copies different files at specified time intervals? I have an application that outputs files everyhour with a different file name and i need to be able to copy each at a specified time interval. I am using this batch with a few changes. It is working great. I am having to manually go in and delete older backups though. How do I get it to only keep 7 days of backups?
Your code works great! When I put the batch file in the Scheduled Tasks and try to get it to run it Bombs. I look in the logfile and it says it ran successfully. I tryed but to no avail. The batch file works great and has saved me a lot of time, but what about a code that will automatically cancel the script should a network drive not be detected? It would be great for those remote customers not to get the error when a mapped drive is not there. Any help on this would be great.
Hi Philip, This is great, just what i searched for, thank you. Is it possible WinNT to create a directory, in which its name is made of the PC host name and date, and if not, how can i prompt the user to insert it manually?
Thanks in advance, Doron. Very good and simple batch file, I edited the original to suit and added the UK date part but that didnt give folders by date. Other than that, All works great. Thanx loads. How can I add a couple of lines to make my backup automatically save to one of the following folders depending on the day of the week? Today is i. I think that the best way is to compare the date that the backup was run with the date that the backup.
Here is another batch file. Not an IT pro? Script Center. Sign in. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. The Official Scripting Guys Forum! Not only but an article with explain also how to create a batch file to map network drive and to automate this process on your computer or in the all network.
Read Also: Unmap network drive using cmd. To map a network drive using T as the drive letter and without username password-protected, use the following guide:. But if not? Is simple, you will need to use username and password on the prompt that will appear. Keep remembering that the user needs to have access to the share. Most people now days like to avoid plain text and for this, you can specify only the username.
The command prompt will ask you for the password.
0コメント