Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    @abetomo/google-drive-cleanerpublic

    google-drive-cleaner

    npm version Build Status Build status

    A tool to remove files on Google Drive.

    install

    % npm install @abetomo/google-drive-cleaner
    

    dryrun

    example

    • Owner is GMAIL_ADDRESS
    • File name contains .xlsx
    % google-drive-cleaner \
    -a AUTH_JSON_FILE_PATH \
    -q "'GMAIL_ADDRESS' in owners and name contains '.xlsx'"
    

    Because it is dryrun, the file to be deleted is only displayed.

    query

    See Search for Files and Team Drives for queries specified with -q.

    delete

    Add --no-dryrun option.

    example

    • Owner is GMAIL_ADDRESS
    • File name contains .xlsx
    % google-drive-cleaner \
    -a AUTH_JSON_FILE_PATH \
    -q "'GMAIL_ADDRESS' in owners and name contains '.xlsx'" \
    --no-dryrun
    

    By adding the --no-dryrun option, the files on the drive are deleted.

    Usage example of Node.js API

    'use strict'
     
    const GoogleDriveCleaner = require('@abetomo/google-drive-cleaner')
    const googleDriveCleaner = new GoogleDriveCleaner('AUTH_JSON_FILE_PATH')
    googleDriveCleaner.clean({
      query: 'Query string for searching delete files.',
      dryrun: true
    })

    install

    npm i @abetomo/google-drive-cleaner

    Downloadsweekly downloads

    0

    version

    0.2.1

    license

    LGPL-3.0

    repository

    githubgithub

    last publish

    collaborators

    • avatar