centos gdrive script, upload to new folder

I'm using https://github.com/prasmussen/gdrive

Hello,

I'm trying to run a daily script that creates a folder in Google Drive and then uploads a bunch of tar archives in it. So far I can create the folder but can't upload if I don't have the id of the folder and I have no idea how to get it. For the time being, I'm uploading to a default folder and manually moving the files.

This is what I have so far

#!/bin/bash  drive folder -t $(date '+%d-%m-%y') //makes the folder  for file in /home/backup/*.tar do drive upload -f "$file" -p (the newly created folder id) done 

Replay

Category: shell script Time: 2016-07-28 Views: 0

Related post

  • Have a file upload to a folder within a folder using Google scripts? 2016-02-15

    I have been using the following script to have people upload PDFs to our Google Drive the past few years. A new idea came up to implement a few new features I was wondering if the following was even possible. I finally figured out how to upload a fil

  • Is there a simple script to duplicate files into a new folder based on a csv file? 2014-08-26

    Our challenge is that we need to search and duplicate approx 3000 images into a new folder. The list of image names is a csv file. The files are all on one drive, but in many different folders. --------------Solutions------------- Using Bash: #!/bin/

  • Cannot add new folder. Upload.aspx gives an 404 error 2015-02-23

    I am using SharePoint 2010. I have a library where the folder option is enabled. When I try to add a new folder I get a popup with an 404 error. When I go to SharePoint Designer and go to the forms folder I see the upload.aspx page. I can check out t

  • PowerShell: Upload documents to folder in document library 2013-04-30

    I'm using SharePoint Foundation 2010. I have to make a PowerShell script that copies a structure found on a network share. Its all good except for one thing... I know how to make Document Library's and folders inside them, I also know how to upload f

  • Keyboard shortcut for creating a new folder or file? (Windows) 2009-07-27

    Does anybody know if there's a keyboard shortcut equivilant to the right click -> New context menu in explorer? Given that I suspect that there isn't, does anybody know of an explorer extension that offers something similar? It would be great to have

  • New Folder here shell extension that works for Vista? 2009-10-29

    On Windows 7 Ctrl + Shift + N works but not on Vista. I found this http://www.baxbex.com/products.html but it doesn't install correctly on Vista. So any alternative including tweaking the registry ? --------------Solutions------------- Barring a spot

  • Is it possible to put a 'new folder' in with the standard toolbar buttons? 2009-11-07

    I suspect the short answer is 'no', but here goes anyway.. For context - under Windows XP, when looking at a folder window, choosing view;toolbars;customize, brings up the 'customize toolbar' dialog. This has 'available toolbar buttons' on the left,

  • Can't create new folder from anywhere in Windows 7 2009-11-30

    I have this problem on two of my new laptops and can't seem to find a decent workable solution elsewhere in forum land. The problem is that on my Windows 7 Professional machines the right mouse button doesn't show the New Folder option and elsewhere

  • Can I upload an entire folder using FTP? 2011-04-11

    I need to upload a full folder using FTP. Is there is any option for transferring a folder and all of its contents at once? --------------Solutions------------- If you're using a standard command-line ftp client, the MPUT command will allow you to tr

  • How can I create a new folder within a nested folder hierarchy using Finder? 2011-07-13

    Here's a thing that's been annoying me for a long time: Using OS X 10.6, when you navigate through folders, expanding them to see their content, you sometimes want to create a new folder at the bottom of the file hierarchy. Consider this example: som

  • Keyboard Shortcuts for "Compress" or "New Folder with Selection"? 2011-08-06

    Has anybody found a decent solution to this? Custom keyboard shortcuts (as defined in System Preferences > Keyboard) don't work for any dynamic menus like Compress XX items or (new in Lion) New Folder with Selection (XX items) because they add the nu

  • How do I make F1 be a hotkey in Windows XP assigned to creating a new folder? 2011-11-04

    How do I make F1 be a hotkey in Windows XP assigned to creating a new folder? I don't know too much about programming or scripting. Can AutoHotkey do this? --------------Solutions------------- Yup. Use FileCreateDir. windowText = line = path = name =

  • Move all files of type to a new folder in windows 7 2012-08-06

    Can anyone help on this. I have mp3 files all over the shop and therefore a lot of duplicates. What i need is a command line function that will move all files of type mp3 to a new folder. I'm not worried if the files structure on the new folder is re

  • Windows 7 (script): Create pre-defined folder structure 2012-08-14

    Is it possible to create a script, which can be activated through the right-click menu in Windows, which will create a pre-defined folder structure? Every time we get a new update at my work I have to make a new "update-record" inside a folder.

  • Create new folder for new sender name and move message into new folder 2012-10-17

    Background I'd like to have Outlook 2010 automatically move e-mails into folders designated by the person's name. For example: Click Rules Click Manage Rules & Alerts Click New Rule Select "Move messages from someone to a folder" Click Next

  • 550 New Folder: Disk Quota exceeded 2013-03-10

    My site's settings are set to unlimited.. Code: Space MB: -1 Traffice MB: -1 so why is it that I'm getting this error when I try to make a new folder? Code: 550 New Folder: Disk quota exceeded When I try to upload a file it says.. Code: 200 Type set

  • extract to a new folder with spl name 2013-06-07

    working on OS X 10.8.3, have part of what I want working, hoping for help with the rest #!/bin/bash # script accepts a path to base dir - base path to extract # also accepts second param - archive /xys/there/usefulLib-version-3.2.1.zip # 1. cd to bas

  • Create a new folder using bash without mkdir command 2013-07-03

    i'm creating a small shell script, and i want to know if is there a builtin command to create a new folder without using the mkdir command. I googled it but i wasn't able to find a way to do that. I dont have any specific motivation or restriction to

  • OSX: check for subfolders, flatten directory structure into new folder, then move to desktop 2013-12-21

    I am in the process of cleaning a huge library of mangas (mostly -but not only- image files). Each manga has a main folder containing subfolders, one for each volume. But sometimes, volume folders contain only image files, and other times they contai

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 2.454 (s). 13 q(s)