Introduction
DLWIN
is a Windows 32-bit port of an old DOS program known as DL (Directory
List). DL provided
a list of the files in a directory. You could sort the list by
name, extension, or date. There was a command area for typing in a DOS
command, and you could enter an equal sign on other rows to execute the
same command against selected files. Macros /, /f, /p, /n and /e could
be used in the command line to substitute the current file's full path
and name, filename, path only, name (no extension), and extension only.
DLWIN
lets you do pretty much the same thing, but adapted to the Windows GUI.
DLWIN can be run with or without a command line parameter. If present, it is the
path to the folder you want to display. If omitted, the last folder
displayed will be shown.
Legal
DLWIN is provided
free under the MIT license. There is no warranty or support. I retain the
copyright to the source code ( DLWIN Copyright (C)
Jack Botner
2009-2014 ). The program can be used by anyone for any purpose. I do
not provide support but am always interested in constructive
comments.
Careless
use of
this program can result in permanent loss of data, you have been warned.
(Example: check one or more files, type 'del' in the command box and
press the execute button. Like in a DOS command window, files
are
not placed in the recycle bin.)
The license for my code can be found
here or
here.
The DLWIN Window
Once open, DLWIN displays a list of files and folders. One
entry consisting of two dots represents the parent folder. Please note
I am using the term folder here which also means subdirectory. The
double dot entry will appear except for root folders. Folder name rows
are displayed in blue and file name rows in black.
The
Options menu item Show Hidden specifies whether hidden files should be
displayed. Click once and it becomes checked; click again and it
becomes unchecked.
DLWIN displays six columns in the file list:
1. Long Name - this is the long file name native to 32 bit Windows.
2.
Short Name - this is how Windows provides compatibility with old 16 bit
DOS applications. Usually this name is invisible to 32 bit
applications, but you could use it if you wanted. The field is blank
when the native file name is compatible with the DOS standard.
3. Attrs - the file attributes. H=hidden, D=directory, R=read only,
S=system file, A=archive bit (file changed).
4. Size - the file size. If large, it may be specified in kb, mb or gb.
5. Date - the date the file was last created or written.
6. Time - the time the file was last created or written.
You can sort the list in three ways:
1.
Sort by file name - click on the Long Name column heading. This is
supplemented by the setting of the Sort by Name/Sort by Extension
Options menu selection.
2. Sort by file size - click on the Size column heading
3. Sort by file date and time - click on the Date column heading
There
are three ways to navigate to other folders. One is to double-click on
folder names or the double-dot entry to move to that folder. Another is
to click on the "up" button or select the View menu Back item. The
third is to use the Open button or the Open entry in the File
menu, which displays the file
system tree and lets you go anywhere.
Running Commands
Commands can be run from
the command entry box above the file list, or by right-clicking on a
file list entry and selecting an action from the pop-up menu.
The
command entry box is intended to work with the checkboxes on the file
list area, but may be used without any checks. The
Check All and Clear All buttons may be useful when you need to deal
with a lot of files. The idea is, you enter a command, check the files
you want the command to run against, then press the Execute button.
DLWIN creates a batch (or command) file in temporary storage and
executes it in a DOS box. At the end there is a pause command, which
gives you the chance to see the results before the DOS window closes.
You can use several macros or abbreviations in the command. The macros
are:
/ - substitute the
full drive+path+filename+extension
/p - substitute the path
/d - substitute the drive (for
example d:)
/n - substitute the name part
of the filename
/e - substitute the extension
part of the filename
/f - substitute the filename
So
as the command operates on each checked file, you can substitute for
parts of the file name from that row. For example, to copy selected
files to a thumb drive (e:), you can check each file and type
copy / e:
in the command box. The full filename is substituted for / in the
command file created.
If
you are dealing with filenames containing spaces, extra care must be
taken when using these macros. DLWIN automatically places quotes around
the name when the full path+filename is being inserted as a
command line parameter. However this is not done with the other macros
(such as /f or /n or even /e). The reason is you might code
combinations like for example /n./e ; if DLWIN placed quotes around the
/n part, the result would be like "file name".ext , which is incorrect.
If
you do not have any file boxes checked, DLWIN will ask you if you want
to run the command anyway. In this way you can shell out to any command
you like. (This corresponds to the old DL's use of the /o tag ahead of
the command.)
The
other way to run commands is to right-click on a file/folder entry and
select a command from the popup menu. By default there are 3 entries in
the menu: open, delete, and notepad. If you select open, it is the same
as double-clicking on the entry, and the file is opened by the
associated program, or the folder is navigated to, as described above.
(The program associations are a Windows feature based on file
extension. See Control Panel/Folder Options.) Selecting delete will
cause the file to be deleted to the recycle bin. (Contrast to the 'del'
command in a DOS box, which does not place any files in the recycle
bin. Also note that Windows does not assign a recycle bin to removeable
drives such as thumb drives.)
The popup menu
is capable of up to 10 entries. To customize it, select Configure Menu
in the Options menu. A dialog opens listing all the popup menu
contents. You can add entries, remove entries, or edit an entry. Each
entry consists of up to 16 characters of text that appears on the popup
menu, and the associated program or application that you want to run.
Use the Browse button to navigate to the application program
executable, and the information will be placed in the dialog box for
you. Note that DLWIN does not perform environment variable
substitutions in the path to the application, so the actual path is
required. Updates to the popup menu will be immediately available to
DLWIN.
One
more thing, you can rename a file or folder in place by first
highlighting the
file name (single left click), pausing a moment, then left-clicking on
it again. An edit box will open and you can modify the name. Click once
outside of the edit box to complete the rename operation.
Searching for Files
The Search For entry box and Go button may be used to search the
displayed list of file names for your text. The rows with any found
entries are highlighted. (The display is not automatically scrolled so
you have to scroll down yourself to check for highlighted entries.)
File Menu
Open - brings up a folder navigation dialog, allowing you to move to
any folder in the file system.
Exit - quit the program.
Up to 10 "recent" paths. (Paths are stored when you use the open dialog. They are not stored during navigation.)
View Menu
Back - navigate to the parent folder.
Refresh
- rebuild the list of files/folders.
Options Menu
Sort
by Name / Sort by Extension - clicking on one causes it to be selected
and the other unselected. This in turn determines what happens when you
click on the Long Name column heading.
Show
Hidden - if checked, causes hidden files to be included in the file
list. Click once and it becomes checked; click again and it becomes
unchecked. (Hidden files are those with the "hidden" file system
attribute turned on. If enabled, hidden files will be displayed with an
H in the Attrs column.)
Configure Menu - brings up the dialog for customizing the popup menu.
Help Menu
Help - to display this file in your browser.
About - to get the program version information.
Button Bar
The button bar contains three buttons that correspond to the most
frequently used menu items: Open, Back, and Refresh.