ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Windows Path Variables

    Scheduled Pinned Locked Moved IT Discussion
    3 Posts 2 Posters 173 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by

      I have a confusing issue with Windows Path Variables. I have a script - that had been working - but is now not. Troubleshooting the issue has left me perplexed.

      My original script was:

      robocopy "%userprofile%\AppData\Local\Google\Chrome\User Data\Default" "d:\_folder-it\Chrome-Default" /xa:sh /xjd /r:5 /w:5 /tee /np
      

      However, it errors with;

      2022/02/11 11:08:45 ERROR 3 (0x00000003) Accessing Source Directory C:\Users\MYUserName\%LOCALAPPDATA%\Google\Chrome\User Data\Default\
      The system cannot find the path specified.
      

      I've been using the common variables so it doesn't make much sense...

      Am I just missing something really simple?

      1 1 Reply Last reply Reply Quote 0
      • 1
        1337 @gjacobse
        last edited by 1337

        @gjacobse said in Windows Path Variables:

        I have a confusing issue with Windows Path Variables. I have a script - that had been working - but is now not. Troubleshooting the issue has left me perplexed.

        My original script was:

        robocopy "%userprofile%\AppData\Local\Google\Chrome\User Data\Default" "d:\_folder-it\Chrome-Default" /xa:sh /xjd /r:5 /w:5 /tee /np
        

        However, it errors with;

        2022/02/11 11:08:45 ERROR 3 (0x00000003) Accessing Source Directory C:\Users\MYUserName\%LOCALAPPDATA%\Google\Chrome\User Data\Default\
        The system cannot find the path specified.
        

        I've been using the common variables so it doesn't make much sense...

        Am I just missing something really simple?

        Probably a permission and account issue. For instance what user or system account is robocopy running under?

        Always try it by changing things such as instead of running robocopy do a dir of the directory and save it to a file or something similar. You'll find the problem by testing and excluding.

        gjacobseG 1 Reply Last reply Reply Quote 0
        • gjacobseG
          gjacobse @1337
          last edited by gjacobse

          @pete-s said in Windows Path Variables:

          Probably a permission and account issue

          Well - SH___T

          Seems that I managed to be in an Admin CMD window rather than my normal CMD window. Obviously that will cause issues since that would be cross accounts.

          I seriously need a day off from IT.... all of IT.

          Locking topic - as I don't need more hashing 😄

          1 Reply Last reply Reply Quote 1
          • gjacobseG gjacobse locked this topic on
          • 1 / 1
          • First post
            Last post