Saved Bookmarks
| 1. |
Solve : DIR listing of files only? |
|
Answer» Hi, Hi, a) Files DIR /A-D b) Folders DIR /AD c) Files & Folders DIR use the /b switch to get a bare listing without header, footer, date info etc. Quote Obviously the DIR command works fine for listing folders (DIR /AD), files & folders (DIR) but I cannot work out how to list just files. I'm sure it's obvious but I cannot work it out. To negate or reverse a switch, put a minus sign in front of it so dir /ad list folders but dir /a-d lists everything except folders (ie just files) Also if you use the o switch eg dir /od list files and folders in date order earliest first, then dir /o-d reverses the order, same with /on etc type dir /? at the prompt for a summary of the options. This looks LIKE a homework question, and if it is, I am surprised your teacher did not go over all this with you already. Hi Dias de verano, Many thanks, it worked great. I never knew about the /A-D command... very useful indeed. The /O switch is also very useful. Thanks a LOT for your help, Roly. Quote This looks like a homework question, and if it is, I am surprised your teacher did not go over all this with you already. haha, I'm actually almost 40 but I have not used DOS since my school DAYS I'm 55 Quote from: Dias de verano on March 10, 2008, 08:55:52 AM I'm 55 Great, thanks for that. |
|