Can I access OneDrive in DOS

Page 1 of 2 12 LastLast

  1. Posts : 13
    Windows 10
       #1

    Can I access OneDrive in DOS


    I use DOS (specifically the WinZip Command Line Add-On) to backup my files. Have been for years and years. I can't figure how to address OneDrive in my .bat file. Can it be done? If so can someone point me to the solution.

    Thanks
    Wally
      My Computer

  2. AndreyT's Avatar
    Posts : 408
    Windows 10 Pro
       #2

    Firstly, Windows 10 does not have "DOS". Apparently, you are talking about command line interface.

    Secondly, OneDrive stores all its files in some specific location on your machine. All these files are regular files accessible as any other file. There's nothing special about them. By default, OneDrive directory is 'Users\<Your User Name>\OneDrive'
      My Computer


  3. Posts : 13
    Windows 10
    Thread Starter
       #3

    Thank you Andrey for the info on OneDrive.

    And, you may call it Command Line Interface or anything you want, but old guys like me still execute ye ole DOS commands which are still in Windows 10.

    Wally
      My Computer

  4. alphanumeric's Avatar
    Posts : 14,303
    Windows 10 IoT
       #4

    Wallytek said:
    Thank you Andrey for the info on OneDrive.

    And, you may call it Command Line Interface or anything you want, but old guys like me still execute ye ole DOS commands which are still in Windows 10.

    Wally
    This will sound like nit picking but he's right. It's not DOS, its a command prompt window with DOS "like" commands. I'm old and old school, but I don't call it DOS, I call it what it is. It's a command line interpreter. There is a big difference between the two. Anyway it should be C: \Users\your user name\OneDrive\. That's where it shows up locally for me. Put a file(s) in there and it will likely sync them to the online equivalent folder.
      My Computer


  5. Posts : 1
    Windows 8.1 Pro
       #5

    Getting back to the original question


    alphanumeric said:
    This will sound like nit picking but he's right. It's not DOS, its a command prompt window with DOS "like" commands. I'm old and old school, but I don't call it DOS, I call it what it is. It's a command line interpreter. There is a big difference between the two. Anyway it should be C: \Users\your user name\OneDrive\. That's where it shows up locally for me. Put a file(s) in there and it will likely sync them to the online equivalent folder.
    Not to be snarky, but I am less worried about what folks call the CLI and more worried about a complete answer to the original question:
    Can OneDrive be accessed from the CLI? The way I intend the question is:
    Can a user share a file on OneDrive (for Business) and then access it from anywhere, on any machine (in the enterprise,) using a batch file, or Powershell script, or VB Script, or whatever version of command line functionality you wish to use to circumvent the error-prone wetware between the chair and the computer?
      My Computer


  6. Posts : 61
    Windows 10 Pro x64
       #6

    Could you upload the code of your .bat file so we can have a closer look ?
      My Computer


  7. Berton's Avatar
    Posts : 11,597
    Win10 Pro Versions 2004 and 2009/20H2, Win10 Pro IP_Dev, Win10 Home 1909
       #7

    This is from the Getting started with OneDrive.docx file in the OneDrive Folder on my computer:
    Share files
    You can share individual files and even entire folders without attaching anything. Send an email with a link to what you’d like to share—and rest assured that everything else in your OneDrive will stay private. To share items from the OneDrive website, just select the check box in the upper-right corner of the item and choose Share.
    Maybe all you need to share is the link to your OneDrive storage.
      My Computers

  8. alphanumeric's Avatar
    Posts : 14,303
    Windows 10 IoT
       #8

    Berton said:
    This is from the Getting started with OneDrive.docx file in the OneDrive Folder on my computer:

    Maybe all you need to share is the link to your OneDrive storage.
    I'm not sure that will work, here is the link to my OneDrive Public folder, https://1drv.ms/f/s!AjOYwiwlwDtpgUMsp2qnevKpGEHb < That is what you get if you right click and select "Share a OneDrive Link".
      My Computer


  9. Posts : 2
    Windows 10
       #9

    Command Shell and Power Shell Access to Online Files


    Wallytek said:
    I use DOS (specifically the WinZip Command Line Add-On) to backup my files. Have been for years and years. I can't figure how to address OneDrive in my .bat file. Can it be done? If so can someone point me to the solution.

    Thanks
    Wally
    I read this post and it did not answer my question, so I tried it out. Turns out that if files are on OneDrive but not stored on your PC, the size shows in parentheses. When you access the file via the command shell or PowerShell, it will automatically download the file. Here's an example:

    Code:
    E:\OneDrive\OneDrive\Documents>dir wmc_dlna.log
     Volume in drive E has no label.
     Volume Serial Number is 3639-65E3
    
     Directory of E:\OneDrive\OneDrive\Documents
    
    08/28/2011  10:03 PM              (48) wmc_dlna.log
                   1 File(s)             48 bytes
                   0 Dir(s)  87,770,542,080 bytes free
    
    E:\OneDrive\OneDrive\Documents>type wmc_dlna.log
    2011-8-28 22:03:51 : [dms] dms terminated..
    
    
    E:\OneDrive\OneDrive\Documents>dir wmc_dlna.log
     Volume in drive E has no label.
     Volume Serial Number is 3639-65E3
    
     Directory of E:\OneDrive\OneDrive\Documents
    
    08/28/2011  10:03 PM                48 wmc_dlna.log
                   1 File(s)             48 bytes
                   0 Dir(s)  87,770,537,984 bytes free
      My Computer

  10. ricardobohner's Avatar
    Posts : 373
    Windows 10
       #10

    @lafleurh What is your question?


      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:33.
Find Us




Windows 10 Forums