-
-
For the directory vs file thing, I can only think to try cd %1 and test for an errorlevel.
I don't think DOS supported any sort of regular expressions or output manipulation. I'd just as soon try it in C.
In newer DOS versions, dir /b will show filenames plain, 1 per line. Type dir /? for details.
-
-
I don't know of any batch command that'd let you check a parameter for filetype / directory. Why would you want to? Is it some sort of assignment?
You can use DOSKEY to create a macro to overload what certain commands do, I think. Like you could overload "dir" to always mean "dir /s /w" or something. It's a way people used to save time, by not having to type all the commonly used switches every time they used a command. You could write a batch file that loads all the DOSKEY macros you need. I don't know if that helps. It's been awhile since I tried anything like that.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules