Now deep clean is realy deep :)
This commit is contained in:
parent
9913ff6bb9
commit
450aefe9d2
@ -1,5 +1,5 @@
|
||||
cleanupMuso <- function(location=NULL, simplicity=TRUE,deep=FALSE){
|
||||
|
||||
areThereAnyFolders <- FALSE
|
||||
whereAmI <- getwd()
|
||||
if(!is.null(location)){
|
||||
setwd(location)
|
||||
@ -10,40 +10,48 @@ cleanupMuso <- function(location=NULL, simplicity=TRUE,deep=FALSE){
|
||||
setwd("LOG")
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolders <- TRUE
|
||||
}
|
||||
|
||||
if(dir.exists("../ERROR")){
|
||||
setwd("../ERROR")
|
||||
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolders <- TRUE
|
||||
}
|
||||
|
||||
|
||||
if(dir.exists("../EPCS")){
|
||||
setwd("../EPCS")
|
||||
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)|(epc$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolder <- TRUE
|
||||
}
|
||||
|
||||
if(dir.exists("../WRONGEPC")){
|
||||
setwd("../WRONGEPC")
|
||||
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)|(epc$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolders <- TRUE
|
||||
}
|
||||
|
||||
if(areThereAnyFolders){
|
||||
setwd("..")
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T)
|
||||
)
|
||||
|
||||
list.files(), value = T))
|
||||
} else {
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T))}
|
||||
}
|
||||
|
||||
if(!simplicity){
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user