From 6163c4d0e8d9d28b4a7c8fb29e10cc435a32acde Mon Sep 17 00:00:00 2001 From: Gerry Nelson <45608078+gerrynelson63@users.noreply.github.com> Date: Sat, 16 Mar 2019 15:47:31 -0400 Subject: [PATCH] Mychanges (#15) * updated the naming of output directory * changed file naming * replace folder content --- exportfoldertree.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exportfoldertree.py b/exportfoldertree.py index 6c7ba90..c443565 100755 --- a/exportfoldertree.py +++ b/exportfoldertree.py @@ -29,7 +29,7 @@ # Import Python modules -import argparse, sys, subprocess, uuid, time, os +import argparse, sys, subprocess, uuid, time, os, glob from sharedfunctions import getfolderid, callrestapi @@ -55,6 +55,10 @@ basedir=args.directory # I now just use the directory the user specifies path=basedir 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 reqtype='get'