end
# get the size in GB of a trip worth of data
list = glob("Pomona/*/2024-06-23/*")
#list=glob("*/2024-10-18/*")
function trip_filesize(list::String)
x = []
for item in list
y = filesize(item)
push!(x, y)
end
return sum(x) / 1000000000
end
#= Dont use, was the start of function below, useful as explanation
a=glob("Pomona/*/2022-10-08/")
for folder in a
f=replace(folder, "2022-10-08/" => "2022-10-08")
d=replace(folder, "2022-10-08/" => "")
println("rsync -avzr $f /media/david/Pomona-1/$d")
run(`rsync -avzr $f /media/david/Pomona-1/$d`)
end
=#
#=for copying over a trip worth of data from 1 Pomona drive to another
a1=glob("Pomona/*/2023-12-25/")
a2=glob("Pomona/*/2024-05-05/")
a3=glob("Pomona/*/2024-06-23/")
d=[a1;a2;a3]
copy_over(d, "Pomona-3")
=#
function copy_over(list::Vector{String}, dst::String)
for folder in list
folder_name::String = split(folder, "/")[end-1]
f = replace(folder, "$folder_name/" => "$folder_name")
d = replace(folder, "$folder_name/" => "")
println("rsync -avzr $f /media/david/$dst/$d")
run(`rsync -avzr $f /media/david/$dst/$d`)
end
end
# delete originating files
##### BE CAREFUL
#for folder in d
# rm(folder, recursive=true)
#end