How to find Onedrive.exe

John Turnbull1

New member
Dec 3, 2016
10
0
0
Visit site
I need to find Onedrive.exe programatically in my software. Is it always located in...

Windows Drive\ users\User's name\appdata\local\Microsoft\OneDrive ?

If not, how can I locate it?

John Turnbull
<redacted>
Thursday 29th December
1.19pm UK time.
 
Last edited by a moderator:

RumoredNow

New member
Nov 12, 2012
18,134
0
0
Visit site
Threads Merged.

User... Please do not create multiple threads on your issue. It actually works against you as any advice gets scattered around and a coherent conversation cannot develop as easily...


What's your end goal? There are often several ways to get at a result.
 

John Turnbull1

New member
Dec 3, 2016
10
0
0
Visit site
1. If you don't want multiple threads, don't accept one new topic immediately and hold another for moderation!
As my question about Onedrive command line was posted immediately, I assumed that this one had got lost somewhere and posted it again. It was only on the second posting that I saw "This is being held for a moderator".

2. My end goal is to get an answer to my question!
 

Terry9

New member
Jun 26, 2023
2
0
1
Visit site
Also, you can also use the following Python code to find the location of the OneDrive.exe file:
Python:
import os

def find_onedrive_exe():
  """Finds the location of the OneDrive.exe file."""

  for root, directories, files in os.walk(os.path.expanduser('~')):
    for file in files:
      if file == 'OneDrive.exe':
        return os.path.join(root, file)

  return None


if __name__ == '__main__':
  print(find_onedrive_exe())
 

Members online

Forum statistics

Threads
326,862
Messages
2,248,987
Members
428,546
Latest member
andraeca