How Can I read file from Egnyte folder through Python?

1k Views Asked by At

Also I want to move this file in another folder and give output file on another folder. All folders are on Egnyte and using Python

client = egnyte.EgnyteClient({"domain": "apidemo.egnyte.com",
"User_Name": "Password"})

folder = client.folder("/Shared/Data/Individuals/Input")

Client use for login on Egnyte.

Folder contains the address of file and now how I read file in this folder and file name is "abc.txt".

How can I read this file and move on location "/Shared/Data/Individuals/Checked".

And after data processed output file saved on other location "/Shared/Data/Individuals/output".

2

There are 2 best solutions below

0
user6037143 On

It's an old post but here is how you would download/read files from a folder.

client = egnyte.EgnyteClient({"domain": "apidemo.egnyte.com",
"access_token": "OAuth token"})
file = client.file("/Shared/Data/Individuals/Input/abc.txt")
file_resource = file.download()
file_resource.read()
0
Imran Rafiq On

Egnyte have desktopconnect(2.0) version which I download on my system and after installation it will make egnyte drive on my pc and now I can easily access the egnyte files from my code just like other local files can read from code.