How do I Close an opened folder in Run or at the Command prompt

jalewis999

New member
Local time
12:35 PM
Messages
3
I have an application that opens a folder using a shell to Explorer. I can close Most apps I shell using Taskkill but not the opened folder. I have tried Openfiles with no luck ( I think it is for networks). I need this to tidy up an application.

Thank you.
 

My Computer My Computer

At a glance

Windows 7 x64 Home
OS
Windows 7 x64 Home
I believe you may find your solution here it would seem to work on open folders to an extent.

Close an Open File
 

My Computer My Computer

At a glance

Windows 7 x64Intel i7 2600kG.skill Ripjaw 16gigs @ 1866Nvidia gtx580 (evga)
Computer Manufacturer/Model Number
Insane hobo technologies. ;-)
OS
Windows 7 x64
CPU
Intel i7 2600k
Motherboard
Asrock z68 extreme 4 gen 3
Memory
G.skill Ripjaw 16gigs @ 1866
Graphics Card(s)
Nvidia gtx580 (evga)
Sound Card
Integrated HD audio + hdmi
Monitor(s) Displays
24" ASUS widescreen + 42" insignia
Screen Resolution
1080p (1920x1080)
Hard Drives
128 Samsung 830
256 Samsung 840
3 x 1tb storage drive (various)
1 western digital 1tb (eSATA)
1 Seagate 1tb (eSATA)
PSU
1 kilowatt SLI/Crossfire rated Silverstone modular
Case
NZXT Phantom + additional 220 fan
Cooling
Zalmann
Keyboard
Microsoft wireless 3000 (v2)
Mouse
MS - wireless 5000 (bluetrack)
Internet Speed
depends on if you ask me or my provider.
Other Info
The above information is provided as is, and the author assumes no responsibility for issues it may cause with your sanity or fanboyism.
Sorry I think this is for shared file and folders. I type net file and nothing is listed. The file requires a special ID.
 

My Computer My Computer

At a glance

Windows 7 x64 Home
OS
Windows 7 x64 Home
Still no luck. I have had three ideas on how to close this folder. I need help with finding out if they are possible.
1. The folder was opened using Explorer. Explorer "Folder Path". Maybe Explorer has other Command line options to close?

2. The Folder can be closed using Task Manager. Maybe taskmgr.exe has command line options.

3. The Folder can close itself with Ctrl|W. Is there a way of issuing those keystrokes without typing. I think the Folder will be in focus.

I appreciate any help. Thank You.
 

My Computer My Computer

At a glance

Windows 7 x64 Home
OS
Windows 7 x64 Home
I know, that topic is old, but problem is actual, so SOLUTION was here -
http://www.msfn.org/board/topic/138301-how-to-close-a-folder-through-cmdbat/?p=1081976



method 1 :



With CMD(command prompt):
TASKKILL /F /FI "WINDOWTITLE eq MYTITLEEEEEEEEEEEEEE" /IM explorer.exe (just change MYTITLEEEEEEEEEEEEEE with the opened folder's title [case-sensitive])





method 2 :
open a new text document and enter this code:


Set oShell = CreateObject("WScript.Shell") If oShell.AppActivate("YourWindowTITLEEEEEEEEEEEEE") Then WScript.Sleep 100 oShell.SendKeys "%{F4}" End If
then save that file as yourfile.vbs and put to your desired path.
Then run the Command:
%windir%\system32\cmd.exe /C "START /WAIT CScript C:\ExampleFolder\yourfile.vbs //NoLogo"

(note,that you should change "YourWindowTITLEEE" and "yourFileName.vbs" to whatever you want. Below is just an

 

My Computer My Computer

At a glance

x
Computer type
PC/Desktop
OS
x
Back
Top