MacResource
Quick Finder copy question - Printable Version

+- MacResource (https://forums.macresource.com)
+-- Forum: My Category (https://forums.macresource.com/forumdisplay.php?fid=1)
+--- Forum: Tips and Deals (https://forums.macresource.com/forumdisplay.php?fid=3)
+--- Thread: Quick Finder copy question (/showthread.php?tid=82196)



Quick Finder copy question - PeterB - 08-02-2009

Hi everyone,

Is there any way in the Finder to copy a bunch of folders from one location to another, but WITHOUT copying their contents?

I could copy all the folders, then individually empty their contents, but maybe there's an easier way...

TiA


Re: Quick Finder copy question - Doc - 08-02-2009

'Worth checking the man pages to see if this does what it's supposed to...

http://www.unix.com/unix-dummies-questions-answers/12033-any-idea-copy-directory-structure.html


Re: Quick Finder copy question - PeterB - 08-02-2009

Hmmmm... Doc, I'm trying that now... we'll see if it works... my Unix skillz are weak...

Edit: no, it looks like what that did was copy everything, including the folder contents...


Re: Quick Finder copy question - Doc - 08-02-2009

I just tried it and it worked.

I made 2 directories in a folder on my Desktop and filled one directory with 3 folders, each folder containing a file.

I then opened the Terminal and navigated to the first folder.

I typed this code at the prompt:
find . -type d | cpio -pvdm

Putting a space after the "-pvdm," I then dragged the folder-icon for the second directory onto the Terminal window and hit the Return key.

It copied the subdirectories without copying the files.


Re: Quick Finder copy question - PeterB - 08-02-2009

Doc, hmmm, not sure what I'm doing wrong, but I did what you did with my files, and it still didn't work ... copied everything and not just the folders.


Re: Quick Finder copy question - silvarios - 08-02-2009

I didn't really read Doc's instructions closely (sorry, lazy day), but it looks right. I was going to say make sure to check your switches, but Doc beat me to it.


Nathan


Re: Quick Finder copy question - Doc - 08-02-2009

Did you type it from scratch or did you copy and paste it?

Maybe you missed a character.


Re: Quick Finder copy question - PeterB - 08-02-2009

copied/pasted.

Interestingly it does seem to copy all the folders first (I see them pop up in the folder in the Finder), THEN copy their contents when I do it.

Probably at this point just faster for me to trash their contents individually, then to figure it out...


Re: Quick Finder copy question - olnacl - 08-02-2009

I searched in vain for such a command, Would that there was an equivalent to DOS:

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/Q] [/F] [/L] [/H] [/R] [/T]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...]

/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.