VBA-How to convert a local path of a file in a folder managed by Drive File Stream into an URL - vba

My goal is to create an xls sheet containing a list of files (file name + link to the file) contained in a folder.
This folder is a GDrive synchronized folder (using Drive File Stream)
I have a VBA macro which is producing this list of files but the link is a local link (G:...) and not an URL link (https://drive.google.com/...) that can be used outside my computer.
Here is an exemple
Let say I have a file in my "Drive File Stream" folder like this one:
G:\Team Drives\Test\my_file.txt
How to convert this path (using excel vba) into a GDrive's URL:
https://drive.google.com/file/d/FILE_ID/edit?usp=sharing
Another way to ask is how to get the file_id from a local path?

Related

Apple Automator to add password to all files within a folder including subfolders and over right files

I have a folder with multiple subfolders, each subfolder contains 1 or more PDF files.
I would like to add password to each file and save over.
My current automator, can get all the files, add password, but then cannot replace the files into their original folders.

Do I have to move my Dropbox folder to work with JupyterLab?

The File menu in JupyterLab has few options for saving and opening files. The menu items do let one browse the file system and search for a directory. For example, the File->Open from Path... menu item only allows entering a file on a path relative to /jlab/root. Questions:
What is the location of /jlab/root. Is there a command that shows it?
I like to keep files with code in a subfolder of my Dropbox folder. What do I do if my Dropbox folder is not a subfolder of /jlab/root?

How to copy artifacts folder to ftp folder in TFS?

I'm trying to publish artifacts and it's other folders files as well.I've read all the docs file provide by microsoft from here and used them but none of them worked for me.
I' tried File patterns as
** =>which copied all root files to ftp
**\* => which copied all sub folders file to ftp's root directory.
What I've wanted is copy folder to folder in ftp aswell.
-artifacts ftp
--a.dll --a.dll
--subfolder --subfolder
---subfolder_1.dll ---subfolder_1.dll
what's happening is
ftp
--a.dll
--subfolder_1.dll
It's copying all sub directories file to root directory of ftp.
I've use curl and ftp both giving me same result.
How can i achieve folder to folder copy in TFS 2017.
It's not related File patterns, to upload the entire folder content recursively, simply specify **.
All you have to do is checking the Preserve file paths in Advanced option.
If selected, the relative local directory structure is recreated under
the remote directory where files are uploaded. Otherwise, files are
uploaded directly to the remote directory without creating additional
subdirectories.
For example, suppose your source folder is: /home/user/source/ and
contains the file: foo/bar/foobar.txt, and your remote directory
is: /uploads/. If selected, the file is uploaded to:
/uploads/foo/bar/foobar.txt. Otherwise, to: /uploads/foobar.txt.

File upload in specific folder of web application in liferay..?

I am using liferay 6.0.5. I am uploading file using following code.
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
String submissionFileName = uploadRequest.getFileName("file");//uploaded filename
File submissionFile = uploadRequest.getFile("file");
this works fine and upload file in tomcat's temp directory with some different name. What I want is.."There is one folder docs in my project directory. I want uploaded file in this directory". How to do this in liferay..?
If you want to change the temp directory for the file upload then you can change the following property in portal-ext.properties:
com.liferay.portal.upload.UploadServletRequestImpl.temp.dir=C:/MyTempDir
Hope this is what you are looking for.
If you want to add files to Liferay's Document Library then check out the following classes:
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portlet/documentlibrary/service/DLFileEntryLocalServiceUtil.html
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portlet/documentlibrary/service/DLFolderLocalServiceUtil.html

How can we access the files in the Data Folder when we publish the Vb.net application

I have added some files that I need to be downloaded to the Application start up path. So I set Build Action as content now the files have been copied some where
C:\Documents and Settings\TestUser.ANNAM\Local Settings\Apps\2.0\Data\HVDRBMY5.8AA\858AT9VM.TNP\test..tion_2d7cfc137d9c2c74_0001.0013_432bd4561850d290\Data
How can access file from the application. My problem since it is a dynamic path will it be same folder count so that we can use like ..\..\Data\ Some think like this
Application.UserAppDataPath gets the path for the application data of a user.
Application.StartupPath gives you the path for the executable file that started the application, not including the executable name.
Starting with one of these, you should be able to use System.IO to manipulate the paths until you get the folder where your data files are.