1

How to Copy the directory and its contents from local file system to VOB (Source control)

I know there are commands (mkdir, mkelem) to create directory , elements and copy the files one by one.
But I would like to know is there any easy way to do this as there are thousands of sub directories and files inside parent directory?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Gopi
  • 619
  • 2
  • 9
  • 27

1 Answers1

1

Yes: you can use clearfsimport, which is made precisely for that.

It will do the mkdir, and cleartool mkelem (or cleartool checkout if you import new versions on top of existing versioned elements)

See also "How can I use ClearCase to “add to source control …” recursively?":

clearfsimport -preview -rec -nset c:\sourceDir\* m:\MyView\MyVob\MyDestinationDirectory

About the clearfsimport options used here, see "Creating a new subdirectory structure in ClearCase?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yes i tried that .But , it is not copying directories or contents..printing some statements like below : /vobs/adp01cv/adp_web/src/deployment/ADP/win32_service/ADPConsoleAll/ADPConsole09022016/Uploader/sample/controls new directory /vobs/adp01cv/adp_web/src/deployment/ADP/win32_service/ADPConsoleAll/ADPConsole09022016/Uploader/sample new directory /vobs/adp01cv/adp_web/src/deployment/ADP/win32_service/ADPConsoleAll/ADPConsole09022016/Uploader/extras new directory – Gopi Sep 07 '16 at 11:23
  • @Gopi That is the `-preview` option explained in http://stackoverflow.com/a/418196/6309 as I mention in the answer. Once you are satisfied with the -preview option, remove it to do the actual import. – VonC Sep 07 '16 at 11:27
  • Thanks VonC. I haven't actually understood the purpose of -preview. It worked . – Gopi Sep 07 '16 at 11:30
  • @Gopi Well done! Considering http://stackoverflow.com/help/accepted-answer, you could consider revisiting your older questions: some of them might deserve an "accepted answer" as well. – VonC Sep 07 '16 at 11:31