Browse Source
Mychanges (#15)
* updated the naming of output directory
* changed file naming
* replace folder content
master
Gerry Nelson
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
exportfoldertree.py
|
|
@ -29,7 +29,7 @@ |
|
|
|
|
|
|
|
|
# Import Python modules |
|
|
# Import Python modules |
|
|
|
|
|
|
|
|
import argparse, sys, subprocess, uuid, time, os |
|
|
import argparse, sys, subprocess, uuid, time, os, glob |
|
|
|
|
|
|
|
|
from sharedfunctions import getfolderid, callrestapi |
|
|
from sharedfunctions import getfolderid, callrestapi |
|
|
|
|
|
|
|
|
@ -55,6 +55,10 @@ basedir=args.directory |
|
|
# I now just use the directory the user specifies |
|
|
# I now just use the directory the user specifies |
|
|
path=basedir |
|
|
path=basedir |
|
|
if not os.path.exists(path): os.makedirs(path) |
|
|
if not os.path.exists(path): os.makedirs(path) |
|
|
|
|
|
else: |
|
|
|
|
|
filelist=glob.glob(path+"/*.json") |
|
|
|
|
|
for file in filelist: |
|
|
|
|
|
os.remove(file) |
|
|
|
|
|
|
|
|
# retrieve root folders |
|
|
# retrieve root folders |
|
|
reqtype='get' |
|
|
reqtype='get' |
|
|
|