Jump to content

This should go through all hardrives and find a particular folder


Recommended Posts

Posted (edited)

This should Search for the unique folder name, and set the drive letter as a variable:

<RunSynchronousCommand wcm:action="add">
                    <Description>Search for the unique folder name, and set the drive letter as a variable</Description>
                    <Order>1</Order>
                    <Path>cmd /c for %i in (D E F G H I J K L N M O P Q R S T U V W X Y Z) do if exist %i\Batches setx /m DRIVE=%i:</Path>
                </RunSynchronousCommand>

This will "run" the file Directories.cmd:

     <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Path>cmd /c %USBDRIVE%\Batches\Directories.cmd</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
                 
What it does do is outputs the letters in the () and burps with a white screen with this code on it:

Windows 11 installation :  Has encountered an unexpected error.  error code 0x80070001-0x40030 .   

The code said it couldn't find a file, what file is it ??  How do I resolve this?

Is it batches directory?  or Directories?  Which Folder?

TIA John 

Directories.cmd

Edited by Rbcc56

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...