In alt.comp.os.windows-10, on Mon, 23 Sep 2024 12:38:55 -0400,
[email protected] wrote:
Hi,
I have several USB flash drives (FAT32) with folders that have Names of
Music Albums and in each folder the Songs are NOT in alphabetical order.
To make a duplicate of this flash drive (FAT32) and Copy everything into
another flash drive (FAT32) in the same order (NOT alphabetical), is there
a way to do this, perhaps with an app that is NOT part of Windows?
Thank You in advance, John
After reading this a day ago, and thinking about it in the back of my
head, I have a vague recollection that if you display the files in DOS
in a given order, when you copy them they copy in the same order. This
sounds unlikely, but it would't take long to test.
BUT, even if I'm wrong here and I probably am, you can "pipe" the output
of the direcotry command to the input of the copy command. In one line, something like this: dir .... /b /o:proper-option | xcopy
OR > xcopy
I forget the difference beween | and > , and in addtion I don't know how
to take the output from the Dir command and make it the input to the
xcopy command but I know it can be done. Read the instructions for the |
and > commands. I know they exist in MS-Dos and CMD, but don't forget
that TCC/LW has enhanced commands. I'm looking at Help for TCC/LE now
and it has the option /o:u meaning unsorted, what you want.
You know even if you don't need it now, everyone should download anbd
install TCC/LE (which is the free version of Take Command) so that you
have it in case something goes wrong with the company and it becomes
hard to get, like happened with XXCopy and the Edsel.
You need the /b option for copy to copy ONLY the file name, and not the
header or footer information or the size, date, attributes, which will
just confuse following XCopy command.
I forget.. You may need to list another option to enable the output to
be piped, but maybe the pipe symbol is all you need.
This page
https://www.lifewire.com/dir-command-4050018 at first I
thought contradicts what the guy in the link below says about order with
no /o, but it doesn't because that guy is talking about not using /o at
all.
Redirecting Input and Output
"The | command is called a pipe. It is used to pipe, or transfer, the
standard output from the command on its left into the standard input of
the command on its right."
Didn't find anything yet about the > command and still don't remember
what is different about it.
Is the MSdos newsgroup still active?
To display a list of files in sorted order, enter
DIR [d:][path][filename] /O:(order)
According to the next link, unsorted order is obtained when no /o parm
is used at all.
What order should you specify?
https://superuser.com/questions/481570/default-file-order-of-dir-command-in-windows-console
-- dated 12 years ago, modified 2.5 years ago --
says, but I don't know if was truo or is still true (I have doubts): dir (without arguments) command always shows files/dirs unsorted, in other
words - in same order, as files/dirs are located on disk. NTFS file
system "sorts" files/dirs internally (simplifying). --- So does the
last sentence contreadict the rest of it? Just ghet TCC/LE and then
there is no question what it does.
Another guy says
The order is "undefined", see below. But this is an XY problem because
there are a lot of tools made for your real sorting purpose
mp3DirSorter
YAFS: Yet Another FAT Sorter
FAT Reader
FAT-32 Sorter
FAT Sorter
Sort MP3 Files On MP3 Player
https://github.com/maxpat78/FATtools
https://svnpenn.github.io/rosso/
How to reorder the files of a FAT32 file system?
According to Microsoft's dir documentation (emphasis mine)
/o [[:]SortOrder]: Controls the order in which dir sorts and
displays directory names and file names. If you omit /o, dir displays
the names in the order in which they occur in the directory. If you use
/o without specifying SortOrder, dir displays the names of the
directories, sorted in alphabetic order, and then displays the names of
files, sorted in alphabetic order. The colon (:) is optional.
The order in which files occur in a directory depends on the file system
and how they store file lists in a directory entry:
In FAT12/16/32 the file allocation table is just a simple linear
list and when a new file is created it's simply put in an empty space in
the list. Hence depending on the creation and deletion state the list
order will vary. That explains why mp3 players often play in the order
you copy files to the folder
In NTFS directory entries are stored in a B-tree structure, so the
result will be an almost-sorted list
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)