Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XCOPY whole-disk listings without a cyclic copy error

3 views
Skip to first unread message

William Allen

unread,
Nov 3, 2001, 7:59:15 AM11/3/01
to
=====Windows 95/98/ME GUI only

The /L (=list-only) switch of XCOPY is extremely useful for creating
file listings that are either not possible, or not straightforward, with
the usual DIR command, for example:
(a) listings that include full contents of hidden and system folders;
(b) listings of files based on specific date comparisons.

This adds many useful listing features to the normal DIR capabilities.
(Note: DIR /s /a _doesn't_ search within hidden subfolders).

However, an attempt to use XCOPY with the /s (include subfolders)
switch for the whole C: drive will normally fail with a cyclic copy error,
even when all that's required is a listing for further Batch processing.

So, for example, an attempt to make, a whole disk listing of all
files that were created on or after a specific date, say today (=3/11/2001),
will normally fail with the usual cyclic copy error, thus:

============Screen capture
C:\WORK>xcopy c:\*.* /l/s/c/h/d:3/11/2001
Cannot perform a cyclic copy
0 File(s)

C:\WORK>
============End screen capture

The usual workaround is to use another drive, say A: like this:

xcopy c:\*.* a: /l/s/c/h/d:3/11/2001

but the destination drive has to be ready (=disk present), even
though no files are copied to it (since /L is a list-only action)

However, the C:\NUL construct as destination can be used to
overcome the cyclic copy error without the use of another drive.
This enables all the listing features of XCOPY to be used
for the entire C: drive to produce lists for Batch processing.
Note:
(a) A wildcard _can't_ be appended to the C:\NUL (to make it
C:\NUL\*.* ) in order to prevent the File or Directory question
(if you do, the cyclic copy error intervenes). Therefore the usual
question needs to be answered with a pipe.
(b) The C:\ in C:\NUL is needed, except as in (c), or the cyclic
copy error intervenes and prevents the list being generated.
(c) The C:\ _isn't_ necessary in the _special_case_ where the
current folder is the root folder of C:

This shows the syntax for a sample listing of all files created on
or after 3/11/2001 (ddmmyy locale):

============Screen capture - get list in LongFileName format
C:\WORK>echo.f | xcopy c:\*.* c:\nul /l/s/c/h/y/d:3/11/2001>LIST

C:\WORK>dir list | find /i "list"
LIST 9,096 03/11/01 12:47 LIST

C:\WORK>
============End screen capture

============Screen capture - get list in ShortName format
C:\WORK>echo.f | xcopy c:\*.* c:\nul /l/s/c/h/y/n/d:3/11/2001>LIST

C:\WORK>dir list | find /i "list"
LIST 5,510 03/11/01 12:51 LIST

C:\WORK>
============End screen capture

(Note that the /N switch of XCOPY has the useful feature
of producing the full short-form specification, including
foldername, unlike the /z switch of DIR which doesn't
short-alias the foldername part)

There is no cyclic copy error, but note that the first three lines
of the file LIST will contain the fixed text:
====Start of fixed text
Does nul specify a file name
or directory name on the target
(F = file, D = directory)?f
====End of fixed text

The rest of the file LIST contains the list produced by XCOPY
(in this case all files created today, including full recursion into
hidden and system folders). The items in LIST usefully _don't_ have
an initial drive ( C:\ )specification prefix. This means that processing
of the list is easier, since with the C:\ missing, the items are not
full pathspecs and can more reliably be bounced off the custom
PROMPT text for simple list processing.

We've found that this cyclic copy suppression feature has several
applications here, and is a useful addition to XCOPY's many uses.

--
William Allen

Note 1:
I'm aware that the *.* in "xcopy c:\*.* " is optional. It is included
merely to suggest that other, more restrictive, wildcard specs
may be using to produce listings, too.

Note 2:
Actual copying (less useful) as opposed to producing lists:

If C:\NUL is replaced with a folder that presently doesn't exist,
and the question answered D, and an actual copy allowed to
go ahead (no /L switch), a cyclic copy error intervenes as usual.

If C:\NUL is replaced with a filename that presently doesn't exist,
and the question answered F, and an actual copy allowed to
go ahead (no /L switch), a file overwrite contention problem arises.

Note 3:
The list in the example above will, of course, contain the LIST file
itself, and also the total file count at the end (prefixed with multiple
spaces). In the example, the list will also contain two files of the
general format (filenames with letters in range A-P no extension):
WINDOWS\TEMP\AMBGBHFA
WINDOWS\TEMP\AMBGBHFG
These are the temporary pipe files that exist only during the
execution of the ECHO+XCOPY pipe. These two files will be
removed by Windows when the pipe operation finishes and
before the list is processed (so note this for processing lists).

The first lines containing the question can be snipped off
in the Batch file that produces the list, for example:

====Begin cut-and-paste (omit this line)
@ECHO OFF

:: List all filespecs (short-alias) created on/after 3/11/2001 in file LIST
ECHO.F | XCOPY c:\*.* c:\nul /l/s/c/h/y/n/d:3/11/2001>LIST

:: Snip first three lines from LIST (to remove Question lines)
ECHO.@PROMPT e0 2f$_rcx$_1$_w0$_q>%TEMP%.\S.BAT
%COMSPEC%/e:4096/c %TEMP%.\S.BAT | debug %TEMP%.\S.BAT>NUL
SET C=
:LOOP
COPY /b %TEMP%.\S.BAT+LIST %TEMP%.\S>NUL
find /v "/"<%TEMP%.\S>LIST
SET C=%C%+
IF NOT (%C%)==(+++) GOTO LOOP

FOR %%F IN (S.BAT S) DO DEL %TEMP%.\%%F
SET C=

====End cut-and-paste (omit this line)
To use the code above, cut-and-paste the text between the ==== lines
into a file with extension .BAT and base name of your choice. Lines
that don't begin with two spaces have wrapped in transmission. The
Batch code is intended for use in the Win9x GUI, where it was tested.


William Allen

unread,
Nov 3, 2001, 5:18:00 PM11/3/01
to
William Allen wrote in message
...snip

> We've found that this cyclic copy suppression feature has several
> applications here, and is a useful addition to XCOPY's many uses.

This is an example of C:\NUL cyclic copy suppression, in
a script to delete all files with a particular extension on C:
This script searches fully into hidden and system folders.
Because of its nature the script is inactivated. Activate
as shown in the script. The inactivated script produces
a temporary Batch file PF.BAT in the TEMP folder, which
will do the deletion job if executed. The activated script
actually executes this temporary script. Use with care.

If the script is needed to delete files that are themselves
hidden, system, or read only, activate the [optional] attrib line.

Handles long file names by using /N switch to produce
short-name alias filespecs. The excess fixed text lines
in the xcopy scan are trimmed by filtering for [Space]
characters. The script avoids the usual "Bad command
or file name" errors by executing the subroutine code in
a COMMAND NUL/c shell. This avoids the use of
CTTY NUL (and the spurious blank lines it generates).

Use the script by typing its name with the EXTension
concerned as the first command-line parameter, thus:

ScriptName NWS

to delete all files with extension NWS

====Begin cut-and-paste (omit this line)
@ECHO OFF

IF (GOTO:)==(%1) %1%2 (Subroutine handler)
IF (%1)==() GOTO EOF

choice /c:ny /n " Delete all C:\files with extension %1 y/n "
IF NOT ERRORLEVEL 2 GOTO EOF

:: [Optional] attrib C:\*.%1 -r -s -h /s

ECHO.@PROMPT DEL C:\>%TEMP%.\L.BAT
ECHO.F|xcopy C:\*.%1 C:\NUL /s/l/n/h/c |find /v " ">>%TEMP%.\L.BAT
%COMSPEC% NUL/c %0 GOTO: _PREFIX
DEL %TEMP%.\L.BAT

GOTO EOF (=Subroutine code follows=)
:_PREFIX (Usage: %COMSPEC% NUL %0 GOTO: _PREFIX)
ECHO.EXIT|%COMSPEC%/e:4096/k PROMPT $N:$_CD $P$_:>%TEMP%.\HOME.BAT
deltree /y %TEMP%.\PF>NUL
%TEMP%.\
FOR %%C IN (MD CD) DO %%C %TEMP%.\PF
PATH>%TEMP%.\P.BAT
SET PATH=
%COMSPEC%/c %TEMP%.\L.BAT|%WINDIR%\COMMAND\FIND ".">%TEMP%.\PF.BAT
FOR %%C IN (CALL DEL) DO %%C %TEMP%.\P.BAT
FOR %%C IN (CALL DEL) DO %%C %TEMP%.\HOME.BAT
:: To activate script UNcomment following line
:: FOR %%C IN (CALL DEL) DO %%C %TEMP%.\PF.BAT
deltree /y %TEMP%.\PF>NUL

:EOF (End-of-file)

====End cut-and-paste (omit this line)
To use the code above, cut-and-paste the text between the ==== lines
into a file with extension .BAT and base name of your choice. Lines
that don't begin with two spaces have wrapped in transmission. The
Batch code is intended for use in the Win9x GUI, where it was tested.

--
William Allen


William Allen

unread,
Nov 3, 2001, 6:28:32 PM11/3/01
to
William Allen wrote in message
...snip
> This is an example of C:\NUL cyclic copy suppression, in
> a script to delete all files with a particular extension on C:
> This script searches fully into hidden and system folders.
> Because of its nature the script is inactivated. Activate
> as shown in the script. The inactivated script produces
> a temporary Batch file PF.BAT in the TEMP folder, which
> will do the deletion job if executed. The activated script
> actually executes this temporary script. Use with care.

A simple idea to clean up the messy tail of the PF.BAT
script without a FIND pipe occurs to me (append @ECHO OFF
to the intermediate script). This makes it simple to re-write the
script to execute any command you please on all files, or
all files with a particular extension, or matching a wildcard.

The first demo is the modified DEL script. The second
demo is the generalised script that prefixes every filespec
with %CMD% into which you can load other commands.

1) DEL version, as before the script is inactivated. Remove
the "::[UNcomment to activate] " to activate it. The inactivated
scripts produce the PF.BAT temporary working script in TEMP.

====Begin cut-and-paste (omit this line)
@ECHO OFF
IF (GOTO:)==(%1) %1%2 (Subroutine handler)
IF (%1)==() GOTO EOF

choice /c:ny /n " Delete all C:\files with extension %1 y/n "
IF NOT ERRORLEVEL 2 GOTO EOF

:: [Optional] attrib C:\*.%1 -r -s -h /s

ECHO.@PROMPT DEL C:\>%TEMP%.\L.BAT
ECHO.F|xcopy C:\*.%1 C:\NUL /s/l/n/h/c |find /v " ">>%TEMP%.\L.BAT

ECHO.@ECHO OFF>>%TEMP%.\L.BAT


%COMSPEC% NUL/c %0 GOTO: _PREFIX
DEL %TEMP%.\L.BAT

GOTO EOF (=Subroutine code follows=)
:_PREFIX (Usage: %COMSPEC% NUL %0 GOTO: _PREFIX)
ECHO.EXIT|%COMSPEC%/e:4096/k PROMPT $N:$_CD $P$_:>%TEMP%.\HOME.BAT
deltree /y %TEMP%.\PF>NUL
%TEMP%.\
FOR %%C IN (MD CD) DO %%C %TEMP%.\PF
PATH>%TEMP%.\P.BAT
SET PATH=

%COMSPEC%/c %TEMP%.\L.BAT>%TEMP%.\PF.BAT


FOR %%C IN (CALL DEL) DO %%C %TEMP%.\P.BAT
FOR %%C IN (CALL DEL) DO %%C %TEMP%.\HOME.BAT

::[UNcomment to activate] FOR %%C IN (CALL DEL) DO %%C %TEMP%.\PF.BAT


deltree /y %TEMP%.\PF>NUL

:EOF (End-of-file)

====End cut-and-paste (omit this line)
To use the code above, cut-and-paste the text between the ==== lines
into a file with extension .BAT and base name of your choice. Lines
that don't begin with two spaces have wrapped in transmission. The
Batch code is intended for use in the Win9x GUI, where it was tested.

2) Generalised version

Again, inactivated, but prefixes all filespecs with %CMD% which
makes a flexible method of executing a command on all files
matching a wildcard.

====Begin cut-and-paste (omit this line)
@ECHO OFF
IF (GOTO:)==(%1) %1%2 (Subroutine handler)
IF (%1)==() GOTO EOF

:: Set command to be executed on all files here (TYPE is demo)
SET CMD=TYPE

choice /c:ny /n " Execute %CMD% on all C:\files with extension %1 y/n "


IF NOT ERRORLEVEL 2 GOTO EOF

:: [Optional] attrib C:\*.%1 -r -s -h /s

ECHO.@PROMPT %%%%CMD%%%% C:\>%TEMP%.\L.BAT


ECHO.F|xcopy C:\*.%1 C:\NUL /s/l/n/h/c |find /v " ">>%TEMP%.\L.BAT

ECHO.@ECHO OFF>>%TEMP%.\L.BAT


%COMSPEC% NUL/c %0 GOTO: _PREFIX

SET CMD=
DEL %TEMP%.\L.BAT

GOTO EOF (=Subroutine code follows=)
:_PREFIX (Usage: %COMSPEC% NUL %0 GOTO: _PREFIX)
ECHO.EXIT|%COMSPEC%/e:4096/k PROMPT $N:$_CD $P$_:>%TEMP%.\HOME.BAT
deltree /y %TEMP%.\PF>NUL
%TEMP%.\
FOR %%C IN (MD CD) DO %%C %TEMP%.\PF
PATH>%TEMP%.\P.BAT
SET PATH=

%COMSPEC%/c %TEMP%.\L.BAT>%TEMP%.\PF.BAT


FOR %%C IN (CALL DEL) DO %%C %TEMP%.\P.BAT
FOR %%C IN (CALL DEL) DO %%C %TEMP%.\HOME.BAT

::[UNcomment to activate] FOR %%C IN (CALL DEL) DO %%C %TEMP%.\PF.BAT

laura fairhead

unread,
Nov 5, 2001, 2:55:41 AM11/5/01
to


Just had an idea, how about using \ ? It seems to work,
and '\' will always exist, or X:\ where X=the drive you're
listing for;

XCOPY /L /S C:\ C:\

byefrom

--
: ${L:-aura} # http://lf.8k.com:80
: # http://lf.1accesshost.com

William Allen

unread,
Nov 5, 2001, 5:36:58 AM11/5/01
to
laura fairhead wrote in message
...snip

> Just had an idea, how about using \ ? It seems to work,
> and '\' will always exist, or X:\ where X=the drive you're
> listing for;
>
> XCOPY /L /S C:\ C:\

Yes. Good idea. Needs the /y switch to avoid stall, as here:
xcopy /l /y /s c:\*.ext c:\
to list all *.EXT on C:\

Also has the useful advantage of avoiding the usual
xcopy File or directory question, so gives a cleaner
list. Thanks. The cyclic error avoidance makes the
/L switch a powerful Batch technique.

--
William Allen


Charles Dye

unread,
Nov 5, 2001, 11:48:10 AM11/5/01
to
"William Allen" <ma...@mayfly13.fsnet.co.uk> wrote in message news:<9s0ppg$10bnc7$1...@ID-55970.news.dfncis.de>...

>
> This adds many useful listing features to the normal DIR capabilities.
> (Note: DIR /s /a _doesn't_ search within hidden subfolders).

With no prejudice against the XCOPY /L technique that you're
working out here, I'd like to point out that a patch to fix
Microsoft's decade-old DIR /S bug is available. Freeware, by
John Augustine; I don't have a URL handy, but I'm certain that
SAC has it, and probably SimTel does as well. IIRC, the
package name is DOS-FIX.ZIP (though in fact what it modifies
is COMMAND.COM.)

As always, if you do decide to patch important files like
COMMAND.COM, it's a good idea to keep an unpatched copy handy
on a bootable floppy. Also, most DOS-based systems including
Windows 9x have more than one copy of COMMAND.COM present on
the hard drive. It's a good idea to make the same modification
on all copies, to keep them identical; otherwise you risk
possible checksum errors when COMMAND.COM reloads its transient
portion.

--
Charles Dye ras...@highfiber.com

Outsider

unread,
Nov 4, 2001, 12:14:24 PM11/4/01
to
Charles Dye wrote:
>
> "William Allen" <ma...@mayfly13.fsnet.co.uk> wrote in message news:<9s0ppg$10bnc7$1...@ID-55970.news.dfncis.de>...
> >
> > This adds many useful listing features to the normal DIR capabilities.
> > (Note: DIR /s /a _doesn't_ search within hidden subfolders).
>
> With no prejudice against the XCOPY /L technique that you're
> working out here, I'd like to point out that a patch to fix
> Microsoft's decade-old DIR /S bug is available. Freeware, by
> John Augustine; I don't have a URL handy, but I'm certain that
> SAC has it, and probably SimTel does as well. IIRC, the
> package name is DOS-FIX.ZIP (though in fact what it modifies
> is COMMAND.COM.)

...snip

ftp://ftp.simtel.net/pub/simtelnet/msdos/sysutl/dos-fix1.zip
dos-fix1.zip 8,537 May 12, 1999
Fix for command.com bug that prevents DIR from seeing
files in hidden subdirectories

--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Communicator 4.08
Possibility is an attitude. Impossibility is an opinion.

William Allen

unread,
Nov 6, 2001, 1:20:58 AM11/6/01
to
Charles Dye wrote in message
...snip

> "William Allen" wrote in message
> >
> > This adds many useful listing features to the normal DIR capabilities.
> > (Note: DIR /s /a _doesn't_ search within hidden subfolders).
>
> With no prejudice against the XCOPY /L technique that you're
> working out here, I'd like to point out that a patch to fix
> Microsoft's decade-old DIR /S bug is available. Freeware, by
> John Augustine; I don't have a URL handy, but I'm certain that
> SAC has it, and probably SimTel does as well. IIRC, the
> package name is DOS-FIX.ZIP (though in fact what it modifies
> is COMMAND.COM.)

Thanks for drawing attention to that. However, I merely mentioned
the DIR problem in case anyone reading the article didn't know
about it (I was aware of DOS-FIX but don't personally use it).

The XCOPY /L solution is preferable, since:
1) DOS-FIX installed on a negligible proportion of machines
2) XCOPY (dos ver 7.0 or higher) is already installed on over
99% of non-NT batch-capable machines (Statmarket statistics)
3) Listing format, which omits the initial drive spec, but includes
the rest of the path in full, is more suitable for list processing
4) Listings are available in _full_ short-form path (unlike DIR /z
listings), or alternatively in _full_ long file/folder path versions
5) The many other XCOPY switches make other listing formats
beyond DIR capabilities available.
6) XCOPY doesn't stall with Abort-Retry-Fail if drive not ready
(and doesn't require to be run in a command /F shell for this)

DOS-FIX doesn't add any of the above features to DIR, of course.

As I said in the article, this /L feature is in _addition_ to DIR lists.
I had simply never seen it pointed out before that the cyclic
copy error could be circumvented, making XCOPY /L available
for whole disk lists, so it seemed worthwhile to draw attention to it.

--
William Allen


Charles Dye

unread,
Nov 6, 2001, 12:32:19 PM11/6/01
to
"William Allen" <ma...@mayfly13.fsnet.co.uk> wrote in message news:<9s7vh5$11su6r$1...@ID-55970.news.dfncis.de>...

> The XCOPY /L solution is preferable, since:
> 1) DOS-FIX installed on a negligible proportion of machines
> 2) XCOPY (dos ver 7.0 or higher) is already installed on over
> 99% of non-NT batch-capable machines (Statmarket statistics)
> 3) Listing format, which omits the initial drive spec, but includes
> the rest of the path in full, is more suitable for list processing
> 4) Listings are available in _full_ short-form path (unlike DIR /z
> listings), or alternatively in _full_ long file/folder path versions
> 5) The many other XCOPY switches make other listing formats
> beyond DIR capabilities available.
> 6) XCOPY doesn't stall with Abort-Retry-Fail if drive not ready
> (and doesn't require to be run in a command /F shell for this)

Preferability is in the eye of the user (or some such ugly
metaphor), but really and truly I'm not not arguing against
your technique. I just wanted to point out an easy solution
to a long-standing and irritating bug.

From brief experimentation, it seems to me that your XCOPY /L
directory listing technique works just as well or better with
XXCOPY. Two notes: Use /LL instead of just /L, to suppress
the file sizes that XXCOPY normally appends to the end of each
line; and also use /ZS to suppress all the header and summary
stuff. XXCOPY has recently gone commercial, but there must
be copies of the some of the prior freeware releases kicking
around in the archives.

--
Charles Dye ras...@highfiber.com

Outsider

unread,
Nov 6, 2001, 3:33:47 PM11/6/01
to
William Allen wrote:
>
> 2) XCOPY (dos ver 7.0 or higher) is already installed on over
> 99% of non-NT batch-capable machines (Statmarket statistics)

Your statistics are erroneous and highly misleading!
To be relevant for batch file users, you must use
statistics from a batch website.

Statistics from January 1, 2000 to November 6, 2001 from a
batch website.

Windows NT 86626 40.81%
Windows 98 72138 33.98%
Windows 95 23000 10.83%
Other 14509 6.83%
Windows 2000 11254 5.30%
Windows 3.1 2013 0.94%
Linux 2 1110 0.52%
Macintosh 638 0.30%
SunOS 5 436 0.20%
Windows XP 117 0.05%
DOS 85 0.04%
HP-UX 64 0.03%
IRIX 48 0.02%
WebTV 45 0.02%
OS/2 42 0.01%
AIX 34 0.01%
FreeBSD 27 0.01%
Windows ME 27 0.01%
OSF1 22 0.01%
Amiga 2 0.00%
Acorn 1 0.00%

Windows 91.96%
That's all Windows versions including NT, 2000, 98, 95, 3.1.

Outsider

unread,
Nov 6, 2001, 3:36:13 PM11/6/01
to
William Allen wrote:
> 2) XCOPY (dos ver 7.0 or higher) is already installed on over
> 99% of non-NT batch-capable machines (Statmarket statistics)

Your statistics are erroneous and highly misleading!

Windows 91.96%
That's all Windows versions including NT, 2000, 98, 95, 3.1, ME, XP.

Outsider

unread,
Nov 6, 2001, 4:06:51 PM11/6/01
to
William Allen wrote:
> 2) XCOPY (dos ver 7.0 or higher) is already installed on over
> 99% of non-NT batch-capable machines (Statmarket statistics)

I don't think your statistics are accurate for batch file users.

Pixelab_Datman

unread,
Nov 8, 2001, 10:39:07 AM11/8/01
to
When it comes to the cyclic copy situation, XXCOPY (a boldly
extended XCOPY) is the right choice.

While for /L (List-only) cases, you may use various techniques
such as using NUL or different drive for the destination which
are as a band-aid solution. In some instances, these may not
be an option.

For XXCOPY, the cyclic copy situation is not even a problem
to worry. Unlike XCOPY which stops operations when it detects
such a cse, XXCOPY go one step further by excluding the very
destination directory which would cause the death spiral.

For example, as a form of compact backup, you may create
a "skeleton copy" of the entire C: drive into a subdirectory
to save all the existing files and directories (with zero-byte
files). This would be a classic case of cyclic copy if you
choose the destination in a directory inside C: drive.
But, no problem with XXCOPY.

xxcopy c:\ c:\backup0\ /clone /sz0

(The /sz<n> switch saves the first n bytes of each file.)

Even though XXCOPY may emulate XCOPY's behavior if you add
/CC (or /CC0) explicity to be alerted of such a case,
the default operation makes it completely transparent.

In essense, with XXCOPY, the cyclic copy is not an issue.

You may try the freeware at

http://www.xxcopy.com/xxcopy/

Kan Yabumoto
======================================================================

"William Allen" <ma...@mayfly13.fsnet.co.uk> wrote in message news:<9s0ppg$10bnc7$1...@ID-55970.news.dfncis.de>...

William Allen

unread,
Nov 10, 2001, 6:24:08 PM11/10/01
to
William Allen wrote in message
...snip

> =====Windows 95/98/ME GUI only
>
> The /L (=list-only) switch of XCOPY is extremely useful for creating
> file listings that are either not possible, or not straightforward, with
> the usual DIR command, for example:
> (a) listings that include full contents of hidden and system folders;
> (b) listings of files based on specific date comparisons.
>
> This adds many useful listing features to the normal DIR capabilities.
> (Note: DIR /s /a _doesn't_ search within hidden subfolders).

One minor addition to the notes about cyclic copy error
suppression with the /L switch. The command line:

xcopy C:\NUL C:\ /l /e /s

generates a list of all folders on C:\ (including hidden and
system folders). Each foldername has \NUL postfixed, and
the initial C:\ (drive and root folderspec) is NOT present. The
list can easily be tidied up with SED, of course:

The code below generates a list of all foldernames in short-name
alias format. The list begins with an initial line consisting of the text
NUL
and ends with a [Space]s-prefixed foldername count line.
(Omit the /n to generate long foldername format)

====Begin cut-and-paste (omit this line)
@ECHO OFF

xcopy C:\NUL C:\ /l /e /n /s>LIST
TYPE LIST | sed s/\\NUL//g>LIST

====End cut-and-paste (omit this line)
To use the code above, cut-and-paste the text between the ==== lines
into a file with extension .BAT and base name of your choice. Lines
that don't begin with two spaces have wrapped in transmission. The

Batch code above was written and tested in the Win9x GUI.
Requires SED in the path.

--
William Allen

Windows compatible version of SED (the Stream EDitor) freeware from:
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/sed302b.zip
ftp://ftp.cdrom.com/.27/simtelnet/gnu/djgpp/v2gnu/sed302b.zip
source-code-inclusive version
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/sed302s.zip
ftp://ftp.cdrom.com/.27/simtelnet/gnu/djgpp/v2gnu/sed302s.zip


0 new messages