00005 :
00006 if len(sys.argv) < 3:
00007 error = "Usage: cpFromCastor fromDir toDir (optional filter)"
00008 exit(error)
00009 user = os.getenv("USER")
00010 castorDir = "/castor/cern.ch/cms/store/caf/user/" + user + "/" + sys.argv[1] + "/"
00011 filter = ""
00012 if len(sys.argv) > 3:
00013 filter = sys.argv[3]
00014 fileList = ls(castorDir,filter)
00015 destDir = sys.argv[2]
00016 copiedFiles = cp(castorDir,destDir,fileList)
00017
00018 if len(copiedFiles) != len(fileList):
00019 error = "ERROR: I couldn't copy all files from castor"
00020 exit(error)