Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to empty a cloud folder properly #19

Open
MauroSteel opened this issue Aug 8, 2017 · 1 comment
Open

How to empty a cloud folder properly #19

MauroSteel opened this issue Aug 8, 2017 · 1 comment

Comments

@MauroSteel
Copy link

MauroSteel commented Aug 8, 2017

Working on a script in a case where multiple users upload files to an inbox-folder on Google Drive. Script is downloading, doing some stuff, moving & renaming according some scripting and uploading renamed files to different folders. Just working fine ;-)

At some point, i want to clear the inbox. However, in the meantime the script is running, user x can have added a new file to the inbox.

How can i prevent that new files will be removed? Or did i miss an argument?

Now i've (inbox is cloud-folder, down is local folder):

## download to local folder
/opt/jdrivesync/jdrivesync.sh --down -r "$inbox" -l "$down" 

{do stuff}

## empty local folder
rm -rf "$down"/*
rm -rf "$down"/.[a-z]*
## upload empty folder = empty cloud folder
/opt/jdrivesync/jdrivesync.sh --up -r "$inbox" -l "$down" 
@siom79
Copy link
Owner

siom79 commented Aug 8, 2017

Have you tried --no-delete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants