0

Hello, before I ask anything THIS IS A HOMEWORK QUESTION! I know alot of people dont like to help with homework, however I have really tried on this and I still dont think I have it. Im not asking for the answer as I do need to learn it myself but if someone could roughly tell me where I am going wrong I would be so thankful...

This is the requirements: A batch file that...
• It will backup all contents of a folder called 'myFiles' to a folder called 'myFilesBackup'.
• If 'myFilesBackup' doesn't exist, the batch file should create it.
• If 'myFilesBackup' is empty the batch file should copy all files including subdirectories.
• If 'myFilesBackup' is not empty it should copy only newer files, without prompting.
• Don't use absolute paths, only relative folder names.
• You will need to use command line Help to find the best command to use and what parameters to use. The Copy command won't work; you will need a command that does eXtra.
• You may have noticed from Internet research that some batch files use the @echo off command. Do not use this command in this batch file.

MY ANSWER:
REM stuff here.........
xcopy C:\myFiles C:\myFilesBackup /E /Y

Am I on the right track?

Thank you

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Fest3er
1

...MY ANSWER:
REM stuff here.........
xcopy C:\myFiles C:\myFilesBackup /E /Y

Am I on the right track?

Thank you

That is a fine tentative start. Without doing the work for you, a google search for "ms command batch howto" yielded ComputerHope.com which is an adequate reference to that which is possible in MS command batch files. Pay particular attention to the 'id' command; it is key to what your assignment is supposed to teach.

Votes + Comments
Good direction without giving it away :)
0

That is a fine tentative start. Without doing the work for you, a google search for "ms command batch howto" yielded ComputerHope.com which is an adequate reference to that which is possible in MS command batch files. Pay particular attention to the 'id' command; it is key to what your assignment is supposed to teach.

Geez! I do apologize for the typing error! I meant to refer to the if' command!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.