0

I have some scripts to do some work for me on Windows 7, and one issue I have is that my most used script lives on a flash drive, clears out the Drivers folder, then opens the Drivers folder for me automatically. Is there any way to have it close the original Windows Explorer window where I clicked the icon? I can't put a shortcut on my desktop because the flash drive letter changes a lot

12
  • Are you open to the script being a power shell script or must it be a batch script? Mar 17, 2012 at 19:09
  • I don't know about Windows 7, but on XP you can go to Disk Management and assign a drive letter to a flash drive while it is plugged-in and afterwards it will always be assigned that drive letter when you plug it in again (assuming the letter is not in use by something else at the time).
    – martineau
    Mar 17, 2012 at 19:23
  • @ScottChamberlain I would much rather it be the regular .BAT or .CMD script as it should run on Windows 2000 or higher Mar 17, 2012 at 19:44
  • @martineau Yes, 7 and Vista can as well; my issue is that this will be in other computers as well, and sometimes I have 3 or 4 other drives plugged in on USB that I scan for as well (I work in a computer shop) Mar 17, 2012 at 19:44
  • 1
    Luke: OK, then maybe your script could begin by executing this free program which closes all open Explorer windows -- which is overkill but might be acceptable -- only thing is I don't know if it'll work on Win7...
    – martineau
    Mar 18, 2012 at 19:53

0

You must log in to answer this question.

Browse other questions tagged .