{"action":"closed","issue":{"url":"https://api.github.com/repos/jay0lee/GAM/issues/339","repository_url":"https://api.github.com/repos/jay0lee/GAM","labels_url":"https://api.github.com/repos/jay0lee/GAM/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/jay0lee/GAM/issues/339/comments","events_url":"https://api.github.com/repos/jay0lee/GAM/issues/339/events","html_url":"https://github.com/jay0lee/GAM/issues/339","id":190399827,"number":339,"title":"Can not delete folder with URL, can only delete folder with ID.","user":{"login":"BuildingOutLoud","id":13244580,"avatar_url":"https://avatars.githubusercontent.com/u/13244580?v=3","gravatar_id":"","url":"https://api.github.com/users/BuildingOutLoud","html_url":"https://github.com/BuildingOutLoud","followers_url":"https://api.github.com/users/BuildingOutLoud/followers","following_url":"https://api.github.com/users/BuildingOutLoud/following{/other_user}","gists_url":"https://api.github.com/users/BuildingOutLoud/gists{/gist_id}","starred_url":"https://api.github.com/users/BuildingOutLoud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuildingOutLoud/subscriptions","organizations_url":"https://api.github.com/users/BuildingOutLoud/orgs","repos_url":"https://api.github.com/users/BuildingOutLoud/repos","events_url":"https://api.github.com/users/BuildingOutLoud/events{/privacy}","received_events_url":"https://api.github.com/users/BuildingOutLoud/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-18T19:19:51Z","updated_at":"2016-12-27T18:56:29Z","closed_at":"2016-12-27T18:56:29Z","body":"I believe there is a small bug in parsing URL's when deleting a drive folder. Using the following command should delete everything in a user's drive:\r\n\r\n    gam user testuser@example.com show filelist | gam csv - gam user ~Owner delete drivefile ~alternateLink purge\r\n\r\nIt does not, however, delete folders. below is an example showing that folders can be deleted using the doc ID, but not the URL. Deleting docs with a URL does work.\r\n\r\n    ### List all files for a user. There is both a doc and a folder.\r\n\r\n    cmd>gam user testuser@example.com show filelist\r\n    Getting files for testuser@example.com...\r\n     got 2 files for testuser@example.com...\r\n    Owner,title,alternateLink\r\n    testuser@example.com,Untitled document,https://docs.google.com/a/example.com/document/d/<DOC ID>/edit?usp=drivesdk\r\n    testuser@example.com,test folder,https://docs.google.com/a/example.com/folderview?id=<FOLDER ID>&usp=drivesdk\r\n\r\n\r\n    ### Delete a doc using the URL\r\n\r\n    cmd>gam user testuser@example.com delete drivefile https://docs.google.com/a/example.com/document/d/<DOC ID>/edit?usp=drivesdk purge\r\n    purging <DOC ID> for testuser@example.com (1/1)\r\n\r\n\r\n    ### Try to delete a folder using the URL\r\n\r\n    cmd>gam user testuser@example.com delete drivefile https://docs.google.com/a/example.com/folderview?id=<FOLDER ID>&usp=drivesdk purge\r\n    trashing tps: for testuser@example.com (1/1)\r\n\r\n    ERROR: 404: File not found: tps: - notFound\r\n    'usp' is not recognized as an internal or external command,\r\n    operable program or batch file.\r\n\r\n    cmd>gam user testuser@example.com delete drivefile https://docs.google.com/a/example.com/folderview?id=<FOLDER ID> purge\r\n    purging tps: for testuser@example.com (1/1)\r\n\r\n    ERROR: 404: File not found: tps: - notFound\r\n\r\n\r\n    ### Successfully delete folder using only the ID\r\n\r\n    cmd>gam user testuser@example.com delete drivefile <FOLDER ID> purge\r\n    purging <FOLDER ID> for testuser@example.com (1/1)\r\n\r\n"}}
{"actor":{"display_login":"jay0lee"}}