sorry my english is not that good so i will try to explain part by part.
-
lets assume i have 50gb disk space. i will download file using rclone. may be each file 20~30gb.
-
after download the file i process the file may be archive/screeenshot create etc using powershell script.
-
after process done upload the file.
lets say i want to work on total 2tb files (each file may be 1~40gb). since i have limited space what i want to do is. check if folder is empty or not. if folder is empty: rclone download command will run. if folder is not empty: rclone download will not run.
If ((Get-ChildItem -Force "EMPTY FOLDER PATH") -eq $Null) {
./rclone copy "remotename:filename" "folderpath"
move command to EMPTY FOLDER PATH
}
If ((Get-ChildItem -Force "EMPTY FOLDER PATH") -eq $Null) {
./rclone copy "remotename:filename" "folderpath"
move command to EMPTY FOLDER PATH
}
If ((Get-ChildItem -Force "EMPTY FOLDER PATH") -eq $Null) {
./rclone copy "remotename:filename" "folderpath"
move command to EMPTY FOLDER PATH
}
now problem is once first rclone download command line run, it will download the file and move the file to EMPTY FOLDER PATH
. after that another script will work for the download file processing.
now once rclone first download command finish. it will check if EMPTY FOLDER PATH
is empty or not. if it's not empty it will keep run the command till last and end it.
any idea how how to keep retry the second download command if empty folder condition does not not match?