Transferring folder structure on Windows

Solution 3:
Robocopy replaces xcopy in Windows 7 and offers the ability to limit copies to a specific number of folder levels. For instance:
– It includes subfolders, even if they are empty (use a different command to exclude empty folders).
– It only copies the folder structure and files that have zero length.
– It restricts subfolder traversal to N levels, which includes the specified folder itself. It includes any immediate subfolders under the specified folder, but not their subfolders and so on.
For more information, refer to this link: http://technet.microsoft.com/en-us/library/cc733145.aspx.
Solution 1:
You can utilize XXCOPY with the /T and /DL switches. Visit http://www.xxcopy.com for further details.
Solution 2:
If you prefer not to use third-party programs, the native XCOPY command in Windows 7 can also duplicate a folder structure. This command will create the directory structure, including empty folders, but without copying the files.


Solution:

The maven-resource-plugin can be utilized for purposes similar to this.


  ...
  
    
      
        maven-resources-plugin
        2.6
        
          
            copy-resources
            
            validate
            
              copy-resources
            
            
              ${basedir}/target/extra-resources
                        
                
                  src/non-packaged-resources
                  true
                
                            
                        
          
        
      
    
    ...
  
  ...

I’m uncertain about the possibility of configuring it to copy only the folders without their content. Additionally, you could explore the maven-copy-plugin, although it seems that you are not following the Maven approach.

Frequently Asked Questions