1

I know that this has been asked and answered before, but I am home sick and my brain just cannot understand anything very well right now. My OS is Windows, and I am looking to copy only the Exchange data from some specific folders (they are all contained within a root folder, but there are more folder layers which I would like to preserve). In this root folder, there are also other files, which I do not want to copy. I only want to copy the files with the extension .PST.

I have a directory listing of everything in my source location, so I can already identify the files which I want, together with their paths.

I want to copy only the PSTs into a new destination folder, but also preserve the folder structure for the PSTs. These are approx 300 PSTs at a size of 700GBs, so I really do not want to do this manually, but I am just struggling to figure this out.

I wanted to use Robocopy, but it seems that you can only use this for folders? I could have sworn that I used it for files before, but maybe I'm wrong. My brain really is just dead at the moment!

Would anybody be able to explain to me, as if I was an idiot (which I am today) how I can do this?

Thank you very much in advance!

NoHype
  • 11
  • 1
  • 4
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jan 26 '22 at 12:52
  • Try copying just the folder structure first to see is that helps. ....... xcopy “C:\Folder_name” “D:\Folder name” /T /E ..... The /T option copies just the folder names. – John Jan 26 '22 at 12:55
  • Thanks John. That's a good idea so that at least I will have the structure. I will give that a go for a start. If there was a way of getting the PSTs over as well though, that would be the dream! – NoHype Jan 26 '22 at 13:27

1 Answers1

3

Robocopy is definitely an option, and you can definitely include or exclude certain items.

In your case including specific files is easy.

Robocopy source destination *.pst /mir 

Which will copy the entire directory structure and only files that match *.pst.

Alternatively if you only want directories that contain a matched file then the /s option is better than either /mir or /e.

Robocopy source destination *.pst /s

In this case you won't get empty directories in your output.

The robocopy documentation has more information on the various options.

Mokubai
  • 92,720