Keep your file dialogs one click away from the folders you actually work in.
让任何“打开文件”对话框一两下就回到你刚刚工作的目录。
A common workflow: edit a file in some project folder → switch to a browser / Word / messenger to upload or attach it.
Most file dialogs still open in “Documents” or wherever you were last, so you click through a bunch of folders just to get back to where you were working.
QuickJumpFolders watches the directory trees you tell it to.
Whenever you create / modify / rename a file inside them, it records the most recently touched folder. You can then jump to that folder in two ways:
- Ctrl+J (faster) — press it while any file dialog is open; the dialog navigates there instantly.
- Quick access shortcut (fallback) — click the pinned container folder in Explorer's Quick access, then double‑click
latest.lnk.
- Watcher thread
UsesReadDirectoryChangesWto recursively watch your configured roots, capturing file create / delete / rename / modify events and filtering out noisy Office lock files, browser temp files, etc. - Ctrl+J hotkey (primary)
A globalCtrl+Jhotkey is registered at startup. Press it while any file dialog is in the foreground; the app uses the Windows UI Automation API to locate the dialog’s file‑name input box, inject the latest directory path, and simulate Enter. No process injection — UI Automation is a public Windows accessibility API, so AV tools never object. - Shortcut manager (fallback)
Maintains alatest.lnkinside two fixed container directories (%USERPROFILE%\QuickJumpFolders_latestand%USERPROFILE%\QuickJumpFolders_latest2). Whenever the tracked directory changes, it rewrites both.lnkfiles to point to the most recently touched folder. - One-time setup (for the shortcut fallback)
You drag these two container directories into Windows Explorer’s “Quick access” sidebar. The pins stay there forever, but thelatest.lnkinside always points at the most recently modified folder. - Daily flow
Either press Ctrl+J inside any open file dialog to jump instantly, or click the pinned container in Quick access → double‑clicklatest.lnk. The address bar always shows the real path, so the “Up” button navigates to the actual parent directory.
The first design tried to hook IFileOpenDialog::Show, injecting into Office / Chrome processes to force their open dialogs to a specific folder. In practice:
- Office's COM path varies across Windows versions (
combase.dllvsole32.dll), so the hook frequently fails to attach. - Even when it attaches, Office's own “remember last folder” logic often overrides
SetFolder. - Injectors tend to trigger AV / Defender and make deployment painful.
The shortcut‑based approach lives entirely in user space, never touches Office or browsers, and is rock‑solid at the cost of one extra double‑click.
Requires Visual Studio 2017/2019/2022 or Build Tools for Visual Studio with the “Desktop development with C++” workload installed.
Note: VS Code (blue icon) is not Visual Studio – it does not include a C++ compiler.
git clone https://github.com/siyiqingtom/QuickJumpFolders.git
cd QuickJumpFolders
build.batbuild.bat auto‑discovers cl.exe. If it finds a suitable toolchain, it compiles and produces:
build\watcher_tray.exe
Edit build\watch_dirs.txt, one directory per line (lines starting with # are comments):
D:\Work
D:\Projects
# E:\Backup\Scratch
Alternatively, you can use a custom config file or command‑line flags (see CLI flags).
Double‑click run.bat or run build\watcher_tray.exe directly.
A tray icon appears in the system tray (bottom‑right). Right‑click it for:
- Show log
- Reload config
- Exit
On startup, the tray log prints a [HINT] line with the two container paths, for example:
C:\Users\you\QuickJumpFolders_latest
C:\Users\you\QuickJumpFolders_latest2
Open Explorer, navigate to these folders, and drag each of them into the “Quick access” sidebar on the left.
You only need to do this once. You can also drop one on the desktop or anywhere else if it fits your workflow better.
These containers always stay pinned, but the latest.lnk inside is constantly updated to point to the most recently modified folder under your watched roots.
Method A: Ctrl+J (recommended)
- Edit any file under a watched directory.
- Open a file dialog in any app (browser upload, Word “Open…”, IM attachment, etc.).
- Press Ctrl+J — the dialog navigates to the latest folder instantly.
- Pick your file and confirm.
Works with Word / Excel / Office, Chrome / Edge upload dialogs, and most standard Win32 dialogs. If the hotkey conflicts with another app, you can still use Method B.
Method B: Quick access shortcut (fallback)
- Edit any file under a watched directory.
- The watcher updates
latest.lnkin both container directories. - In any file dialog, click the pinned container in Quick access.
- Double‑click
latest.lnk→ you are now in the latest folder, with the correct path visible in the address bar. - Use the “Up” button as usual to navigate to its parent or elsewhere.
You can override the default config file or add extra directories on the command line:
watcher_tray.exe
Read build\watch_dirs.txt or config\watch_dirs.txt by default.
watcher_tray.exe -c <file>
Use an explicit config file.
watcher_tray.exe -d <dir1> -d <dir2> ...
Add one or more directories from CLI (can be combined with -c).
The tray log will show which directories are effectively being watched after startup.
- Only tested on local NTFS / FAT volumes; network drives are untested.
- Tracks only the single most recent modified folder, not a full history list.
- The number of container directories is hard‑coded to two; edit
GetContainerDirPaths()if you want more. - No built‑in autostart; if you want it to start with Windows, drop a shortcut to
run.batintoshell:startup.
Some potential future improvements:
- Track a small history of “recent folders” instead of only the latest one.
- Optional GUI for configuring watched directories, container paths, and limits.
- Per‑app behaviour (e.g., different roots or filters for Office vs browsers).
- Better handling / UI for network drives and removable disks.
Contributions and ideas are welcome – feel free to open issues or PRs.
MIT — see LICENSE.
很多日常工作都长这样:在某个项目文件夹里改了文件 → 切到浏览器 / Word / 微信,把它上传或附加出去。
但每次打开“打开/上传文件”对话框,默认位置大多在“文档”或上一次的路径,你要一层一层点回刚才的目录。
QuickJumpFolders 会在后台监控你指定的目录树。
只要你在里面新建 / 修改 / 重命名了文件,它就会记录”最近操作的目录”,之后有两种方式跳过去:
- Ctrl+J(更快)——在任意文件对话框打开的情况下按下,对话框立刻跳到那个目录。
- 快速访问快捷方式(兜底)——点”快速访问”里的容器目录 → 双击
latest.lnk。
- 目录监控线程
使用ReadDirectoryChangesW递归监控你配置的根目录,实时捕捉文件的创建 / 删除 / 重命名 / 修改事件,并过滤掉 Office 锁文件、浏览器临时文件等噪声。 - Ctrl+J 全局热键(主要方式)
程序启动时注册全局热键 Ctrl+J。在文件对话框打开的情况下按下,程序通过 Windows UI Automation API 找到对话框里的”文件名”输入框,把最新目录路径写入并模拟回车,对话框立刻导航过去。全程用户态、无进程注入,AV 不会拦截。 - 快捷方式管理(兜底方式)
在%USERPROFILE%\QuickJumpFolders_latest和%USERPROFILE%\QuickJumpFolders_latest2两个固定容器目录里维护latest.lnk。每当目标目录变化,就重写这两个.lnk,让它们始终指向”最近一次真正被你操作过的目录”。 - 一次性配置(配合快捷方式兜底方案)
你只需把这两个容器目录拖到资源管理器左侧的”快速访问”。Pin 会一直存在,但里面的latest.lnk会不断被更新。 - 日常使用
在任意文件对话框里按 Ctrl+J 直接跳转;或点击”快速访问”中的容器目录 → 双击latest.lnk进入真实目标目录。地址栏展示的是真实路径,”上一级”按钮照常工作。
最初版本尝试过 hook IFileOpenDialog::Show:把注入器丢进 Office / Chrome 进程里,强行改它们打开对话框时的初始目录。实测下来问题不少:
- Office 在不同 Windows 版本上的 COM 调用路径不一样(
combase.dllvsole32.dll),hook 经常打不上。 - 即便 hook 成功,Office 自己的“记住上次访问目录”逻辑也会覆盖
SetFolder。 - 各种 AV / Defender 很不喜欢注入器,拦截和误报的问题多。
最终选择了“快捷方式 + 快速访问”这个完全用户态、不动 Office / 浏览器任何东西的方案。代价是用户多双击一下,但稳定可靠,可预期。
需要:
- Visual Studio 2017 / 2019 / 2022,或
- Build Tools for Visual Studio(安装时勾选“使用 C++ 的桌面开发 / Desktop development with C++”)。
注意:VS Code(蓝色图标)不是 Visual Studio,它不带 C++ 编译器。
git clone https://github.com/siyiqingtom/QuickJumpFolders.git
cd QuickJumpFolders
build.batbuild.bat 会自动寻找你机器上的 cl.exe,找到就直接编译,产物主要是:
build\watcher_tray.exe
编辑 build\watch_dirs.txt,每行一个目录,以 # 开头的是注释:
D:\工作
D:\项目
# E:\备用盘\临时
也可以用自定义配置文件或命令行参数,见下方 命令行参数。
双击 run.bat,或直接运行 build\watcher_tray.exe。
系统右下角托盘区域会出现一个图标,右键菜单包括:
- 显示日志
- 重载配置
- 退出
程序启动时,托盘日志中会有一行 [HINT],告诉你两个容器目录的路径,例如:
C:\Users\你\QuickJumpFolders_latest
C:\Users\你\QuickJumpFolders_latest2
打开资源管理器,找到这两个目录,分别拖到左侧“快速访问”区域。
这一步只需要做一次。你也可以把其中一个目录拖到桌面或别的位置,按自己习惯来。
之后,这两个容器目录会一直出现在“快速访问”里,而它们里面的 latest.lnk 会始终指向最新的目标目录。
方式 A:Ctrl+J(推荐)
- 在任意被监控的目录下修改 / 新建 / 重命名文件。
- 打开任意文件对话框(浏览器上传、Word 打开、IM 附件等)。
- 按下 Ctrl+J —— 对话框立刻跳到最新目录。
- 选文件确认即可。
适用于 Word / Excel / Office、Chrome / Edge 上传框,以及大多数标准 Win32 文件对话框。
方式 B:快速访问快捷方式(兜底)
- 在任意被监控的目录下修改 / 新建 / 重命名文件。
- watcher 线程会立刻更新两个容器目录中的
latest.lnk指向这个目录。 - 打开任意文件对话框,点击左侧”快速访问”中的容器目录。
- 双击
latest.lnk→ 你就已经在最新目录里了,地址栏显示的是真实路径。 - 想去上一级/兄弟目录时,照常用”上一级”按钮即可。
可以通过命令行指定配置,覆盖默认行为:
watcher_tray.exe
默认读取 build\watch_dirs.txt 或 config\watch_dirs.txt。
watcher_tray.exe -c <文件>
使用指定的配置文件。
watcher_tray.exe -d <目录1> -d <目录2> ...
通过命令行追加多个要监控的目录(可与 -c 混用)。
启动后,你可以在托盘日志里确认最终实际生效的监控目录列表。
- 目前只在本机 NTFS / FAT 分区上测试通过,网络盘暂未验证。
- 只跟踪最近一个发生变化的目录,不维护完整历史列表。
- 容器目录数量目前硬编码为两个,如需更多可以修改代码中的
GetContainerDirPaths()。 - 没有内置开机自启;想开机自启,可以把
run.bat的快捷方式丢到shell:startup里。
一些可能的改进方向:
- 支持“最近目录列表”,而不仅仅是单一最新目录。
- 提供简单 GUI 来配置监控目录、容器路径和数量限制。
- 根据不同应用采用不同策略(例如对 Office 和浏览器使用不同的根目录或过滤规则)。
- 对网络盘和移动设备做更好的兼容和提示。
欢迎提 issue / PR,一起把这个小工具打磨得更顺手。
MIT — 详见 LICENSE。