• Print

Author Topic: Another useful "file explorer"  (Read 9669 times)

0 Members and 1 Guest are viewing this topic.

benthecomputerguy93

  • Windows 7 User
  • *
  • Offline Offline
  • Posts: 5
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Another useful "file explorer"
« on: January 07, 2016, 11:30:09 am »
Here's just a simple batch script that I found on the internet and changed slightly for my own use. It uses powershell to invoke the openfiledialog() function. This is extremely useful in situations where windows explorer is unavailable on a system, either because of an infection or because its server core edition and thus missing or something along those lines.

Code: [Select]
@echo off
color 0a
echo.
echo Errors and messages will be outputted here.
echo.
setlocal
:top
set filename=
set ps_cmd=powershell "Add-Type -AssemblyName System.windows.forms|Out-Null;$f=New-Object System.Windows.Forms.OpenFileDialog;$f.Filter='All files (*.*)|*.*';$f.showHelp=$true;$f.ShowDialog()|Out-Null;$f.FileName"

for /f "delims=" %%I in ('%ps_cmd%') do set "filename=%%I"

if defined filename (
    start %filename%
goto top
)

Maybe someone else can use it!
If at first you don't succeed then don't be an astronaut....

Floyd

  • Administrator
  • *****
  • Offline Offline
  • Posts: 623
  • Karma: +5/-2
  • Gender: Male
  • I will be in the chamber of understanding.
    • View Profile
    • My website, You have never heard of it.
Re: Another useful "file explorer"
« Reply #1 on: January 19, 2016, 04:50:22 pm »
neat!

wow two new posts by someone other than me in one year? that's a record that hasn't been beat since like 2012
I run this shit.

benthecomputerguy93

  • Windows 7 User
  • *
  • Offline Offline
  • Posts: 5
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Another useful "file explorer"
« Reply #2 on: April 03, 2016, 08:37:20 pm »
Haha well I found the place and thought that it was kinda cool. Then I changed jobs from the one that brought me to find this place so I forgot about it for a couple months. I had thought about just dumping my thoughts relating to stuff like this into here, both to help me organize them a little better but also to share them. I'll get a forum of my own for this someday haha but thats not a top priority for me right now.
If at first you don't succeed then don't be an astronaut....

  • Print