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

...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.

commented: Good direction without giving it away :) +3

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.