Today, I was writing an article called, "Listening to War Rock Soundtrack Outside the Game", which I need a list of file names from a directory on the hard disk. In Windows, I have been so used to navigating the file system with Windows Explorer, I rarely go to the Command Prompt unless I have to. The only problem at hand with Windows Explorer is that it will list the files visually in its window, but you can't copy the names of all the files and paste them into a textbox. I have always enjoyed the object-oriented operation of the OS/2 GUI. So I decided to write a simple batch file that allows you to drag-and-drop a directory from Windows Explorer onto it. After receiving the directory, the batch file will list out the file names in the directory for copying and pasting elsewhere. Thus, ListDir.bat is written.
ListDir.bat "dir name"
Attached File: ListDir.bat
The above ListDir.bat will work with all DOS and Windows versions. However, one shortcoming is that you can have any spaces in the directory argument. Windows NT 4, 2000, and XP provided some additional command-line parameter features to help us alleviate that problem. The attached ListDir.bat below will support directory argument which contains spaces. However, this version of ListDir.bat will only run on Windows NT4, 2000, XP, and future versions of Windows.
Attached File: 1 - ListDir.bat
Did your message disappear? Read the Forums FAQ.
Spam Control | * indicates required field
TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.
No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.
Messages, files, and images copyright by respective owners.
39 Users Online
Copyright © 1996 - 2024. All Rights Reserved.