Run CMD commands on different drives


  1. Posts : 102
    win 10 x64
       #1

    Run CMD commands on different drives


    Hi all,

    I launch cmd on Windows 10 (drive C:) and want to run the command attrib -s -h *.* /s /d from there on the drive E. How to accomplish this, please?
      My Computer


  2. Posts : 1,680
    X
       #2

    Type E:
    Then your current folder will be E:\
    Then run the attrib command.
      My Computer


  3. Posts : 102
    win 10 x64
    Thread Starter
       #3

    I have done this. It says E is not accessible. It's a memory stick.
      My Computer


  4. Posts : 5,478
    2004
       #4

    You are trying to remove some USB malware right?

    Try it this way - from administrator command prompt. attrib -h -r -s /s /d e:\*.*
      My Computer


  5. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #5

    If E is not accessible then that is the problem you need to investigate rather than tinkering with the attibutes of some files you cannot see anyway.

    Denis
      My Computer


  6. Posts : 102
    win 10 x64
    Thread Starter
       #6

    @lx07
    Yes. And is your command different from the one I wrote?
    Thanks as well.
    @Try3: It's accessible. And we can see it but there's malware there and needs to be removed.
      My Computer


  7. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #7

    tomyfr said:
    I have done this. It says E is not accessible. It's a memory stick.
    but
    It's accessible. And we can see it
    I have not seen a drive that is inaccessible to a Command prompt window but is accessible by File explorer [which is what I suppose you mean by "we can see it"].

    I suggest that you right click on it in File explorer and select Scan with Windows defender.

    Denis
      My Computer


  8. Posts : 4,801
    Windows 11 Pro 64 Bit 22H2
       #8

    The drive may have a physical switch that makes it Read Only. Or the may be damage and need to be replaced. Can you go into Disk Management and if you can see the drive try Formatting it.
      My Computer


 

  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 18:41.
Find Us




Windows 10 Forums