export NEWPATH=/somewhere;cd /my-tree;find . -type d|cut -b3-|(while read
DIR;do mkdir -p "$NEWPATH/$DIR");done
Use at your own risk... :)
ET
Andrew Tuna Harris writes:
> Hello there!
>
> "Hellther."
>
> I am about to create a Ruby script to sync my music directory with my
> MP3 player. Before I start, I would like a nice test environment, as my
> MP3 player uses a particular directory tree.
>
> Is there a nice easy way to copy a directory tree without copying over
> all its files? For example, let's say the device has something like...
>
> MP3 Player
> |
> `-Videos/
> |
> `-Music/
> |
> `-Playlists/
>
>
> and in those subdirs are like over 9000 video, music, and playlist
> files. Can I just copy that structure and leave all those files behind?
> so that I have
>
> loltestdir/
> |
> `-Videos/
> |
> `-Music/
> |
> `-Playlists/
>
> but without any files in there?
>
> Thanks!
>
> -tuna
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss