PDA

View Full Version : Commands in directories


andyhaus1057
Oct 4, 2009, 09:27 AM
Hi,

I have a couple of questions...


1) How would I write the command that would create the directory "spam" in the parent of the current directory?

2) How would I write the command to display a long listing of the contents of the etc/sysconfig directory that will work form anywhere on the system?

joel0613
Oct 16, 2009, 08:52 AM
Hello,

Okay, I'm not toally clear on what you are getting at but here are the commands to do I think what you are saying;

1) md.. \spam

2) dir c:\windows\system32\drivers\etc\sysconfig

Somehow, I don't think that's what you are looking for but that seems to be what you are asking.

Good luck

GrantHillsSA
Nov 8, 2009, 12:21 PM
Create a new text file called anything.bat

Edit the file and insert the following...
---------------------------
@ECHO Off
CD..
MD Spam
----------------------------

2) dir c:\windows\system32\drivers\etc\sysconfig
Or dir c:\windows\system32\drivers\etc\sysconfig > c:\list.txt
The second one outputs the file names to c:\list.txt

Cheers