Search code examples
svnversion-controlwildcardmove

SVN - move directory contents to subdirectory using wildcard


I have the following subversion repository:

trunk
    \ folderA
      file1
      file2
      file3

I want to move everything from folderA to a subfolder, like so

trunk
    \ folderA
        \ folderB
          file1
          file2
          file3

Is there an easy way to do this with a single command?

EDIT I should have specified that I was looking for a way to do it using a wildcard. Something along the lines of:

mkdir folderB
mv !(folderB) folderB

Solution

  • svn move --help...

    or go here: http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.move.html

    to see this example:

    Move several files in your working copy into a subdirectory:

    $ svn move baz.c bat.c qux.c src
    A         src/baz.c
    D         baz.c
    A         src/bat.c
    D         bat.c
    A         src/qux.c
    D         qux.c
    

    from this, you perform an update and repository is updated with same.