From: undisclosed on

Thanks for that Pegasus, v. handy.

Just one thing:

> Could file name length cause any problems? It seems to run fine and
then it halts when I hit a folder of classical music that has pretty
long file names.

The problem was more likely having spaces in the filenames, you need
to surround the xcopy arguments with quotes to handle them. This is my
version, which can be placed in your %PATH% and then called anywhere
from the command line:

(CopyFiletypeWithDirs.bat)

Code:
--------------------

REM example usage: CopyFiletypeWithDirs *.mp3 ..\MyMP3Directory

@echo off
echo.
echo - Copying all %1's with full directory structure to %2: -
echo.
xcopy /s "*.%1" "%2" /I
echo.
pause

--------------------


--
_gl
From: Pegasus [MVP] on
"undisclosed" wrote in message
news:9ca856a5b131e1a0ba681e6465b1039a(a)nntp-gateway.com...
>
> Thanks for that Pegasus, v. handy.
>
> Just one thing:
>
>> Could file name length cause any problems? It seems to run fine and
> then it halts when I hit a folder of classical music that has pretty
> long file names.
>
> The problem was more likely having spaces in the filenames, you need
> to surround the xcopy arguments with quotes to handle them. This is my
> version, which can be placed in your %PATH% and then called anywhere
> from the command line:
>
> (CopyFiletypeWithDirs.bat)
>
> Code:
> --------------------
>
> REM example usage: CopyFiletypeWithDirs *.mp3 ..\MyMP3Directory
>
> @echo off
> echo.
> echo - Copying all %1's with full directory structure to %2: -
> echo.
> xcopy /s "*.%1" "%2" /I
> echo.
> pause
> _gl

You are referring to a post that is now 8 months old and therefore a little
stale.

From: Justin on
In article <OxR3qH7LLHA.1996(a)TK2MSFTNGP06.phx.gbl>,
"Pegasus [MVP]" <news(a)microsoft.com> wrote:

> "undisclosed" wrote in message
> news:9ca856a5b131e1a0ba681e6465b1039a(a)nntp-gateway.com...
> >
> > Thanks for that Pegasus, v. handy.
> >
> > Just one thing:
> >
> >> Could file name length cause any problems? It seems to run fine and
> > then it halts when I hit a folder of classical music that has pretty
> > long file names.
> >
> > The problem was more likely having spaces in the filenames, you need
> > to surround the xcopy arguments with quotes to handle them. This is my
> > version, which can be placed in your %PATH% and then called anywhere
> > from the command line:
> >
> > (CopyFiletypeWithDirs.bat)
> >
> > Code:
> > --------------------
> >
> > REM example usage: CopyFiletypeWithDirs *.mp3 ..\MyMP3Directory
> >
> > @echo off
> > echo.
> > echo - Copying all %1's with full directory structure to %2: -
> > echo.
> > xcopy /s "*.%1" "%2" /I
> > echo.
> > pause
> > _gl
>
> You are referring to a post that is now 8 months old and therefore a little
> stale.

Only 8 months?