Question

I am trying to copy some files out of ClearCase using PowerShell. I don't need to actually check them out - it's part of a build process, so I just want to be able to grab copies of them.

My guess is that I need to use cleartool, perhaps with "find", but I'm having trouble actually getting to the files that I want. No matter what "paths" I use I always get an error message. For example:

cleartool find My_VOB\A_Folder\A_Subfolder -print

gives me the error message, "No such file or directory."

I'm trying to make this script reusable by everyone in our development group, so I'd prefer not to have it tied to any specific view. Do I need to create a view on the fly to work with ClearCase?

Was it helpful?

Solution

If you want to copy files, you need a view to access them.
(That is what a ClearCase view, either dynamic or snapshot, is for: accessing specific versions of files)

Either that view exists (and its root path is passed as a parameter) or it don't (in which case I strongly recommend a dynamic view for those kind if reading access)

Even though a cleartool find can list versions not visible in the current view, it still needs a view as a starting point.
A lot of other find examples are available in this IBM article "Additional examples of the cleartool find command".


This thread lists some causes for the "no such file or directory" error message.
(like being in a private directory, as in "non-versionned directory")


This case shows an example of Powershell script using CAL (the ClearCase Automation Library)

OTHER TIPS

You definitely need a view, and make sure the VOB is mounted.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top