This is the file path that I am trying to access: (yes names have been replaced)

C:\Users\MyNAme\OneDrive – company name\MyName\Eclipse\red-app-sdk-3.0-19.12\webmodules\tools\offline-bundle

The command prompt does not seem to like the OneDrive - company name. I have also tried %onedrive% as well and that doesn't work either.

  • 2
    Use quotes...Provide the exact command you used. Use placeholders if you want.
    – Ramhound
    Dec 18 '19 at 23:51
  • 1
    How far along the path can you get in cmd? Are the files offline? Dec 20 '19 at 3:49

I can verify that @Ramhound is correct. You need to put quotes around the variable because when it expands the resultant string includes spaces which are interpreted as they are by the command interpreter.

This does not work:

dir %OneDrive%

This does:

dir "%OneDrive%"

Not the answer you're looking for? Browse other questions tagged or ask your own question.