Upload file to OneDrive

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
drunkenmonkey
Pro Scripter
Posts: 90
Joined: Fri Jan 31, 2020 10:52 am

Upload file to OneDrive

Post by drunkenmonkey » Fri Jan 31, 2020 11:08 am

Hi everyone,
I am new to MS and I tried to upload file.

Can you provide me a code snipet that I can use.

I tried from the example provides but no file is uploaded.

Thank you!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1354
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Upload file to OneDrive

Post by Dorian (MJT support) » Fri Jan 31, 2020 12:43 pm

Hi,

Would copying it to your OneDrive folder do the job? That's how I do it.

Code: Select all

CopyFile>c:\Location\MyFile.txt,C:\Users\UserName\OneDrive\Documents\MyFile.txt
You could similarly use MoveFile.
Yes, we have a Custom Scripting Service. Message me or go here

drunkenmonkey
Pro Scripter
Posts: 90
Joined: Fri Jan 31, 2020 10:52 am

Re: Upload file to OneDrive

Post by drunkenmonkey » Fri Jan 31, 2020 9:55 pm

Thank you! Can you show me how to do it with the HttpRequest
HTTPRequest>https://d.docs.live.net/xxxxxxxxxxxxxxx ... T,,strHTML,,,,
Tried this without success!
Thank you!

drunkenmonkey
Pro Scripter
Posts: 90
Joined: Fri Jan 31, 2020 10:52 am

Re: Upload file to OneDrive

Post by drunkenmonkey » Fri Jan 31, 2020 9:56 pm

thank you! tried this without success.
[snippet=]HTTPRequest>https://d.docs.live.net/xxxxxxxxxxxxxxx ... T,,strHTML,,,,[/snippet]

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Upload file to OneDrive

Post by Marcus Tettmar » Thu Feb 06, 2020 11:28 am

Didn't know you could upload to OneDrive with HTTPRequest but have googled it and see they have a REST API:

https://docs.microsoft.com/en-us/onedri ... aph-online

What kind of file are you uploading? For binary files it won't be trivial and Macro Scheduler probably isn't the tool for the job here.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

drunkenmonkey
Pro Scripter
Posts: 90
Joined: Fri Jan 31, 2020 10:52 am

Re: Upload file to OneDrive

Post by drunkenmonkey » Fri Feb 07, 2020 4:19 pm

Thank you for Link Marcus. I have seen this and others but was not able
to digest the info because I lack of programming skill.

Files format are Outlook msg with atachment witch are mostly pdf and xlxs.

Thank you for your help.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts