Skip to main content
Question

Upload files using VBScript with cURL

  • May 21, 2025
  • 2 replies
  • 10 views

Forum|alt.badge.img

Hi In my work, I have to use vbscript upload a file to the BOX when needed. Unfortunately, after run the code, I failed to see any file uploaded in the Box. By the way, I am using the developer token for a trial. dim oShell set oShell = WScript.CreateObject("WScript.Shell") oShell.Run "curl https://upload.box.com/api/2.0/files/content -H ""Authorization: Bearer BaTcsvhh2ZWaF9vcLqasq88Ps9i88ELG"" -X POST -F attributes='{""name"":""C:\Users\myAccount\opLog_11182016125853.txt"", ""parent"":{""id"":""0""}}' -F file=@C:\Users\myAccount\opLog_11182016125853.txt" set oShell = Nothing It makes me very confusing. Anyone encountered the same problem before? If you could help, very appreciate for the reply.

2 replies

Forum|alt.badge.img

Is it -D instead of -F


Forum|alt.badge.img

Hi kendomen It seems your advice does not work as expect after I've tried it. 😞 I just do the command as the docs says, https://docs.box.com/reference#upload-a-file. Still thanks the help.