Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
()
cmsRelvalreport.exit
tuple exit
Definition:
cmsRelvalreport.py:1000
CommonMethods.cp
def cp
Definition:
CommonMethods.py:189
copyFiles.main
def main
Definition:
copyFiles.py:5
main
Definition:
main.py:1
python.rootplot.utilities.ls
def ls
Definition:
utilities.py:408
Generated for CMSSW Reference Manual by
1.8.5