How to upload text files to Google Drive as google docs?

Sorry if this has been asked and answered before
But I have searched the forum and found nothing that matches what I want to ask

So my question is,how do you upload text files (.txt) to Google Drive as google docs format?

I have tried to add the extension .txt to import-formats during the initial config
After configuration,I just use a regular simple copy command to copy to Gdrive,however the files are uploaded as .txt files,no conversion is done

I have tested with uploading with web frontend and it works perfectly
A workaround I found is rename the files to .docx and of course add the extension to import-formats as well before uploading with rclone
But there are some text files that doesn’t upload as docx format for some reasons

Is there any solution for this?
I suppose it should be very easy to work with but I am very new to rclone
Sorry for a silly question here

Any help will be appreciated

I think you might need --drive-allow-import-name-change as well as -drive-import-formats txt - can you give that a go?

I am on my mobile and will be back to home to test soon
I will report the result here

Thanks in advance!:pray:

Just tried this and it doesn’t work unfortunately,the files are still uploaded as .txt files
This is the command I run

Do you have any other ideas? :thinking:
Thanks

It looks like there is a bug importing .txt files…

Try this potential fix

https://beta.rclone.org/branch/v1.46.0-055-g9f8e1a1d-fix-drive-import-beta/ (uploaded in 15-30 mins)

You’ll still need the --drive-allow-import-name-change --drive-import-formats txt flags

This updated binary works great :+1:
Thank you very much for your help!:v:

Thanks for testing :smile:

I’ve merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.47

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.