Rename synched google drive on google only - google-drive-api

I know that google drive depends on ID of folders/files not the name, so You can have multiple folders with same name.
In my Case I have multiple Unity3D projects where I always synch the assets folder, When I want to download on of my projects it takes me time to figure which assets folder on google drive belongs to my project.
Is there any way I can rename the folder on google drive while keeping it on local drive without changing?
Or any other options can help thanks

I suggests to add folder in each assets folder and name the file with your project name. Make it all capital and add "000" at the beginning of the folder name to make it at the top of the list for ease find

Related

How does google Drive fetch all containing files of folder while we upload folder?

I noticed that while upload any folder on Google drive, Its automatically listed all containing files from an specific folder, however its all at client end and as per my knowledge no any client end language access client directory or system details then how Google Drive listed all containing files by giving only folder reference.
I am not sure about the exact implementation for Google Drive folder upload, but in HTML5, there is a webkitdirectory which support the operation.
See: http://earlysandwich.com/programming/how-to-upload-multiple-files-or-folders-with-html-and-php-168

Google Drive: How do I share folders, so that individuals subfolders are not synced?

How to share Google Drive folders and subfolders so that users can decide what to sync to their hard drive?
Google Drive's sync software (the one you install on your computer) only let's you decide which top level folders you want to sync. You cannot not sync subfolders alone.
You can however share folders in a way that allows your users to put them into the root folder directly. This way, they can unselect them individually for syncing.
Say you have the following folder structure
- Project [parent]
-- Planning files [subfolder 1]
-- Execution files [huge subfolder 2]
Instead of sharing the Project folder to a user, do individually share the Planning files and Execution files folder. This way, users can link both directly into their My Drive root folder.
In the sync client they're now top level folders and can be individually deselected.
If you would instead share the Project" folder, a user would need to "split up" the single share, to move e.g. "Execution files out of it. This breaks sharing of the latter for everyone.
By the way, Google Drive apparently seems to be able to have a single folder or file in two or more parent folders. This would also allow for a sharing concept. However, the new Google Drive interface, introduced in 2014 (?) hides this functionaliy. In the old Google Drive, you can use "Move to", then hold CMD/CTRL and selected more than one parent.
Good tip, but this doesn't work very well if your folder structure is like this:
- Projects
-- Project ABC
--- Planning Files
--- Execution Files
-- Project DEF
--- Planning Files
--- Execution Files
A solution might be the hidden feature of adding a folder to multiple parents. You can still do this in the new drive interface by selecting a folder and pressing SHIFT+z. Use that to add all Planning files to a Planning folder.
For those of you who want to sync only a subfolder not the whole folder with thing inside
here are the steps.
assuming you downloaded and installed drive.
go to you sub-folder you wish to sync to your computer.
click once on folder, so it turns blue.
press keys Shift then Z
a menu will pop up
don't choose a place to put since it only syncs main folders (put it in the drive not a folder)
on your COMPUTER right click on drive.
go to google drive with icon in front of it.
choose a the sub-folder you PUT in the DRIVE
reminder when you press Shift and Z it copies the folder, so any changes you do to shortcut folder that's in your DRIVE is updated to the drive on computer and inside sub-folder.

add prefix to all files and folders in google drive

How can I add a prefix or a suffix to all files/ folders in Google Drive using Google Script. The objective is that whenever a users needs to be deleted to add a suffix to all files and folders and transfer to another user so that the documents of the user can easily be tracked at a later stage.
Regards
The File.setName() method in the Drive Service will do what you want. I'd be happy to help further if you post a sample of your code.

Google apps script - Folder as a script container

Is it possible to restrict the reach of a Google Apps Script to a given Google Drive folder?
I'm creating a stand alone apps script that will be hosted as a web app.
The goal of the script is to list all the sub-folders contained inside the folder (the root folder) where the stand alone script is saved and return a JSON with information about those sub-folders and the files that they contain.
notes:
The name or the id of the root folder is unknown as the script will be distributed to Google Drive users and I want to allow them to save the script inside any folder they would like to.
Although the root folder can have any name or any hierarchical position inside the user's Google Drive folders tree, I'm planning on enforcing a predefined naming structure for the sub-folders.
I thought about two approaches to solve this, but I do not know which one is possible and what Classes and Methods to use.
1)The first approach would be to restrict the script reach to it's container folder, therefore the call to DocsList.getFolders(), would return an array of folders objects just for the folders (sub-folders) contained by the root folder.
Question: Does Google Apps Script provide a Class or Method to restrict the reach of a stand alone script, as described above?
2) Get the name or id of the root folder containing the script and using it retrieve the sub-folders and their files.
Question Does Google Apps Script provide a Method to get the name or the id of the folder that contains the script?
Thanks in advance for any help or tip.
None of those are currently possible. You can write a ui to ask the user for the folder. The google picker now supports picking folders.

google drive folder information

I would like to use Google Drive to push files in various folders onto a remote computer. I would like this to be a one-way transaction so the people using the computer cannot write to Google Drive.
However, when I use the following C# code to get the files from Google Docs I only get the file names, not their directories where they will be on the remote computer. This won't work because some files in different directories have the same name. Is there a way to programmatically get directory information from these files?
Alternately, if I could set up the Google Drive folder to be read-only, that would accomplish my goal and probably be easier. Can this be done?
You should use the Google Drive API to list all files and check the parents field of each of them to map those files into folders:
https://developers.google.com/drive/v2/reference/files#resource