Main Page
Namespaces
Classes
Package Documentation
RecoVertex
BeamSpotProducer
scripts
copyFiles.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
import
sys,os,commands
3
from
CommonMethods
import
*
4
5
def
main
():
6
if
len(sys.argv) < 3:
7
error =
"Usage: copyFiles.py fromDir destDir (optional filter)"
8
exit
(error)
9
fromDir = sys.argv[1]
10
print
fromDir
11
if
(fromDir[len(fromDir)-1] !=
'/'
):
12
fromDir +=
'/'
13
destDir = sys.argv[2] +
"/"
14
filter =
""
15
if
len(sys.argv) > 3:
16
filter = sys.argv[3]
17
fileList =
ls
(fromDir,filter)
18
copiedFiles =
cp
(fromDir,destDir,fileList)
19
20
if
len(copiedFiles) != len(fileList):
21
error =
"ERROR: I couldn't copy all files from "
+ fromDir
22
exit
(error)
23
24
if
__name__ ==
"__main__"
:
25
main
()
SimDataFormats::CaloAnalysis::cp
CaloParticle cp
Definition:
classes.h:18
copyFiles.main
def main()
Definition:
copyFiles.py:5
eostools.ls
def ls(path, rec=False)
Definition:
eostools.py:348
cmsRelvalreport.exit
exit
Definition:
cmsRelvalreport.py:1000
main
Definition:
main.py:1
Generated for CMSSW Reference Manual by
1.8.11