Moving files

  • Thread starter Thread starter inkleput
  • Start date Start date
I

inkleput

Running XP Pro SP2.

Is there a way to move a bunch of files alphabetically without moving them
one at a time? That is, move them according to the directory order
instead of according to some purely physical scheme? It would seem that
such a process would be pretty much self-defragging.

JimL
 
Is there a way to move a bunch of files alphabetically without moving them
one at a time? That is, move them according to the directory order
instead of according to some purely physical scheme? It would seem that
such a process would be pretty much self-defragging.

The “directory order” is the order in which the files were added to the
directory. There isn’t a physical scheme; directory entries have nothing to do
with where the files are located.

To move files in alphabetical order, open two explorer windows, navigating one
to the folder with the files, the other to the target directory. In the source
folder, click the Name column to sort alphabetically by filename, then
select-all (Ctrl-A / Edit->Select-All), then cut (Ctrl-X / Edit->Cut), then
activate the destination folder and paste (Ctrl-V / Edit->Paste). Windows will
move the files in the order in which the files are in the list which in this
case would be alphabetical.

You can also move sorted by date, type, etc. this way. If it doesn’t work,
create a fresh, new folder as the target (one that has never had files in it).
Sometimes when the target folder has already had the files in it before, the
files don’t get inserted into the directory list as expected, but rather as they
were previously.
 
Alec S. said:
The directory order is the order in which the files were added to the
directory. There isn t a physical scheme; directory entries have nothing
to do with where the files are located.

By directory order I mean the order seen when one opens a directory such
as one might get up via command line, or, as I guess you would prefer, a
folder listing.

By physical scheme, I mean precisely what you say it is not. Data poked
into physical places on the media without regard to the alphabetical
directory I refer to.

Obviously windows does not refer to hard drive files the same as all other
operating systems, but even the birth mother of windows moved files
according to its directory listings, so that copying one drive to an
identical drive and back again made things essentially alphabetized and
defragmented. (And you could still use it to boot with.)

JimL
 
By directory order I mean the order seen when one opens a directory such
as one might get up via command line, or, as I guess you would prefer, a
folder listing.

A directoy is really just a list of files. When you copy a file into a
directory, it will create an entry that usually goes at the bottom, but will
sometimes overwrite the entry of a deleted file under certain circumstances.
Therefore, like I said, directory order is the order in which they were added to
the directory (for the most part), and that is the order you get when you use
DIR in a command prompt.

Obviously windows does not refer to hard drive files the same as all other
operating systems, but even the birth mother of windows moved files
according to its directory listings, so that copying one drive to an
identical drive and back again made things essentially alphabetized and
defragmented. (And you could still use it to boot with.)

More or less, but not always. There are circumstances in which copying files to
a folder in which they already existed (especially when moving files back and
forth between two folders) will not alphabetize them. To guarantee a sorted
directory order, sort them in Explorer and copy them to a new folder that has no
entries (never had files in it).
 
Alec said:
A directoy is really just a list of files. When you copy a file into a
directory, it will create an entry that usually goes at the bottom, but will
sometimes overwrite the entry of a deleted file under certain circumstances.
Therefore, like I said, directory order is the order in which they were added to
the directory (for the most part), and that is the order you get when you use
DIR in a command prompt.

Actually on NTFS directories are index attributes and index buffers and
NTFS presorts the directories in the attributes.

John
 
John John (MVP) wrote (in
Actually on NTFS directories are index attributes and index buffers and
NTFS presorts the directories in the attributes.

Sorry, keep forgetting that most people use NTFS by default now.
 
Alec S. said:
Therefore, like I said, directory order is the order in which they were
added to
the directory (for the most part), and that is the order you get when you
use
DIR in a command prompt.

This result from DIR didn't sound right, and I just did a sample. I get a
listing alphabetized by name (with subdirectories interleaved). This is
what I recall as "always" being the case, over many years and computers. I
guess it's possible I could have modified the DIR command, but (a) I don't
recall having done that on current computer, and (b) from help DIR that
seems to require setting the "DIRCMD environment variable" which I haven't a
clue how to do.

Speaking of which, does anyone know a good online reference on Command
Prompt / DOS ?
Whatever skills I developed back when it was the only game in town are
rapidly fading, but there are times when it's just the best tool.
I'm talking about basic, single user stuff, creating batch files, etc ...
I've got a book on using DOS to work with maintenance, installation, etc
across networks, but it just assumes you know the basics.
 
ggull said:
This result from DIR didn't sound right, and I just did a sample. I get a
listing alphabetized by name (with subdirectories interleaved). This is
what I recall as "always" being the case, over many years and computers. I
guess it's possible I could have modified the DIR command, but (a) I don't
recall having done that on current computer, and (b) from help DIR that
seems to require setting the "DIRCMD environment variable" which I haven't a
clue how to do.

Speaking of which, does anyone know a good online reference on Command
Prompt / DOS ?
Whatever skills I developed back when it was the only game in town are
rapidly fading, but there are times when it's just the best tool.
I'm talking about basic, single user stuff, creating batch files, etc ...
I've got a book on using DOS to work with maintenance, installation, etc
across networks, but it just assumes you know the basics.

Google Basic DOS commands. Take your pick. Here's just one of many

http://www.computerhope.com/overview.htm

gls858
 
Alec S. said:
A directoy is really just a list of files.

I know what a directory is and I know it is different in various operating
systems - Unix, OS9, OS2, Linux, Flex - Intel, and Motorola architectures
and many others. But that's beside the point. I defined what I meant
when I wrote what I wrote. Going on about windows technicallities is YOUR
point on my thread. My point regards concepts beyond windows, not
technical details within windows. So to me appealing to the windows bible
is beside the point.

JimL
 
Running XP Pro SP2.

Is there a way to move a bunch of files alphabetically without moving them
one at a time? That is, move them according to the directory order
instead of according to some purely physical scheme? It would seem that
such a process would be pretty much self-defragging.

JimL

Note that when files are moved in Windows Explorer by dragging icons
from one folder to another folder on the same drive partition the file's
contents on the hard drive are normally left where they already are.
Windows only moves the directory entries from one folder to the other.
If your goal is to position the file contents in a continuous block on
the drive you would want to copy the files to the new location THEN
delete the originals. Unless the partition is freshly defragmented there
still might be some fragmentation of the storage space and even within
individual files, especially if the files are being copied to the
partition where Windows is managing the size of the swap file.

A future drive defragmentation could potentially reposition the files
out of order or even in different sections of the drive, depending on
what priorities are designed into the drafragmentation application's design.
 
I know what a directory is and I know…


I don’t know what you’re complaining about. You asked how to copy files in
alphabetical order and I gave you instructions to do that which work.
 
Back
Top