Skip to content
Advertisement

How to extract all .rar files inside a folder (gdrive) from google colab?

I have a folder consist of many .rar files. I need to extract all .rar files inside that folder. I’ve mounted my gdrive account to the colab. What I’ve done is:

JavaScript

but I got error:

JavaScript

I think file.path will work since when I used:

JavaScript

It prints all file paths in that folder

How to accomplish it efficiently?

Advertisement

Answer

For using variable in !unrar, you need to use this code

JavaScript

So, in your situation you will have next code:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement