Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have been working with this assignment for afew hours
and I am having trouble getting it to work right..... I am fairly new at cmd. Help would get greatly appreciated!
Might be able to paypal some cash if motivation needed!
hah..
The assignment is:1. Write a batch file that displays the current system date
setting without prompting for a new date and save that
output as date.txt.
2. Now display the network adapter address and save that
output as mac.txt.
3. Copy the two text files to a new file named both.txt.
4. Delete the first two text files.
5. Make a directory named asg7
6. Move both.txt to asg7.
7. Change directories to asg7.
8. Delete both.txt then delete asg7 silently, without
prompting.Thanks!!

What have you written so far?
=====================================
If at first you don't succeed, you're about average.M2

When I said i was new i wasn't kidding...hah
@echo off
md asg7
cd asg7
echo %date%
echo %date% >> date.txt
echo %ipconfig -all%
echo %ipconfig -all% >> mac.txt
dirThanks!

You're off to a good start.
Try again, keeping the steps in the order called for by the assignment.
=====================================
If at first you don't succeed, you're about average.M2

Firstly ipconfig isn't a variable, it won't work with echo or with percentage signs, %, around it which are variable markers. Redirection >> works with almost any command and echo doesn't need to be involved.
Asking for help with homework is fine, but if you grab a script and run, with no understanding on how it works your script may just impress people enough that they ask you how it works. Now there's a fun situation.....
Here's some links that may point you in the right direction:
Ipconfig - Youv'e probably already got this.....
Copy - Pay attention to plus signs.
Md - Make directories
Move - Move files.
Rd - Remove directories.There I've pratically done it all for you, you said something about money? ;)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |