explorer

Programmatically selecting file in explorer

╄→尐↘猪︶ㄣ 提交于 2019-11-27 03:59:45
In my application I can programmatically open explorer and select a file using the following code: void BrowseToFile(LPCTSTR filename) { CString strArgs; strArgs = _T("/select,\""); strArgs += filename; strArgs += _T("\""); ShellExecute(0, _T("open"), _T("explorer.exe"), strArgs, 0, SW_NORMAL); } My problem is that if I call this function a second time with a different file, but in the same folder, the selection in explorer does not change to the new file, but remains on the previous file. For example, if I call my function with C:\path\to\file1.txt , a new explorer window will open and file1

Rules for “Date Modified” of folders in Windows Explorer

99封情书 提交于 2019-11-27 01:44:00
问题 How does Windows Explorer determine the "Date Modified" field for folders? [Aside: I know this is asking from an explorer-specific perspective, but the behaviour could be useful to coding search/sort type activities] Is there a definitive description of this anywhere - searches of Microsoft, MSDN, Google & Stack Overflow have been unsuccessful. Personal experiments seem to suggest that in a tree of folders: when a folder/file is added/deleted in a folder, the containing folder's date modified

Open explorer on a file

﹥>﹥吖頭↗ 提交于 2019-11-27 00:02:27
In Python, how do I jump to a file in the Windows Explorer? I found a solution for jumping to folders: import subprocess subprocess.Popen('explorer "C:\path\of\folder"') but I have no solution for files. From Geoff Chappell's The Windows Explorer Command Line import subprocess subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"') For some reason, on windows 7 it always opens the users Path, for me following worked out: import subprocess subprocess.call("explorer C:\\temp\\yourpath", shell=True) A nicer and securer solution (only in Windows unfortunately) is os.startfile() . When it's

Programmatically select multiple files in windows explorer

有些话、适合烂在心里 提交于 2019-11-26 22:33:37
I can display and select a single file in windows explorer like this: explorer.exe /select, "c:\path\to\file.txt" However, I can't work out how to select more than one file. None of the permutations of select I've tried work. Note: I looked at these pages for docs, neither helped. https://support.microsoft.com/kb/314853 http://www.infocellar.com/Win98/explorer-switches.htm This should be possible with the shell function SHOpenFolderAndSelectItems EDIT Here is some sample code showing how to use the function in C/C++, without error checking: //Directory to open ITEMIDLIST *dir =

Integrating into Windows Explorer context menu

那年仲夏 提交于 2019-11-26 22:19:17
I want to write a small tool, that does the following: When you right click on a file with a certain file-extension the Windows Explorer context menu shows an additional entry. When you click this entry a certain EXE is launched with this file as one of its parameters. I would like to use C#/.NET 2.0 for this. If it's not possible I could also do it with C++/Win32. My questions are: Is it possible with C# .NET 2.0? What are the necessary functions for integrating into the Windows Explorer context menu? How can I make this permanent? (I don't want to relaunch this tool after every boot) What do

How to create an Explorer-like folder browser control?

无人久伴 提交于 2019-11-26 20:03:46
Using C# and WinForms in VS2008, I want to create a file browser control that looks and acts like the left pane in Windows Explorer. To my astonishment, such a control does not ship with .NET by default. Ideally, I would like its contents to be exactly the same as in Explorer. For example, on Windows 7, it should show the Favorites and Libraries pseudo-folders. Of course, I do not want to code specifically for each version of Windows if I can help it. I have browsed around, and there are some examples of such controls, but they are all hand-rolled and therefore won't work 100% the same as the

Windows Azure Storage Explorer List

落花浮王杯 提交于 2019-11-26 18:29:57
现在有一些Azure storage explorer工具,下面是列表,share方便大家下载。好像Windows Azure tool for visual studio 2010 1.2也集成readolny的storage explorer(没有用过). 使用了几种工具,感觉 Cloud Berry Explorer for Windows Azure Blob 和 Windows Azure Management Tool 都不错。不过 Cloud Berry Explorer 是需要注册(免费注册). 而 Azure Storage Explorer (3.0 bata, 2009.11)有些功能并没有实现,在查询时比较麻烦和慢,也没有找到源代码可供修改. Windows Azure Storage Explorer Block Blob Page Blob Tables Queues Free Azure Blob Client X Y Azure Blob Compressor Enables compressing blobs for upload and download X Y Azure Blob Explorer X Y Azure Storage Explorer X X X Y Azure Storage Simple Viewer X X X Y

Drag Drop from .NET application to Explorer

僤鯓⒐⒋嵵緔 提交于 2019-11-26 17:07:08
问题 I'm looking to provide users with ability to drag&drop files from grids and other controls in my application into Explorer. Any good samples/articles for that? 回答1: It's pretty straight-forward, just call DoDragDrop in a MouseDown event. You'll need actual files on disk for this to work. private void Form1_MouseDown(object sender, MouseEventArgs e) { string[] files = new string[] { @"c:\temp\test.txt" }; this.DoDragDrop(new DataObject(DataFormats.FileDrop, files), DragDropEffects.Copy); } 回答2

How to programmatically restart windows explorer process

给你一囗甜甜゛ 提交于 2019-11-26 17:05:36
问题 I'm working on a windows shell extension, and unfortunately, when making changes to the DLL, I must restart windows explorer (since it keeps the DLL in memory). I found this program from Dino Esposito, but it doesn't work for me. void SHShellRestart(void) { HWND hwnd; hwnd = FindWindow("Progman", NULL ); PostMessage(hwnd, WM_QUIT, 0, 0 ); ShellExecute(NULL, NULL, "explorer.exe", NULL, NULL, SW_SHOW ); return; } Does any one have something they can share to do this? P.S. I realize that I can

Opening a folder in explorer and selecting a file

泄露秘密 提交于 2019-11-26 17:04:44
I'm trying to open a folder in explorer with a file selected. The following code produces a file not found exception: System.Diagnostics.Process.Start( "explorer.exe /select," + listView1.SelectedItems[0].SubItems[1].Text + "\\" + listView1.SelectedItems[0].Text); How can I get this command to execute in C#? Tomasz Smykowski Use this method : Process.Start(String, String) First argument is an application (explorer.exe), second method argument are arguments of the application you run. For example: in CMD: explorer.exe -p in C#: Process.Start("explorer.exe", "-p") Samuel Yang // suppose that we