{"id":13411202,"url":"https://github.com/eteeselink/cdhere","last_synced_at":"2025-03-14T16:34:11.254Z","repository":{"id":7664836,"uuid":"9026606","full_name":"eteeselink/cdhere","owner":"eteeselink","description":"Change the current console directory to wherever you're looking at in Windows Explorer","archived":false,"fork":false,"pushed_at":"2014-05-15T12:16:47.000Z","size":17534,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-31T20:45:11.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eteeselink.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-26T09:09:28.000Z","updated_at":"2023-10-15T22:54:03.000Z","dependencies_parsed_at":"2022-09-17T15:11:35.614Z","dependency_job_id":null,"html_url":"https://github.com/eteeselink/cdhere","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteeselink%2Fcdhere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteeselink%2Fcdhere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteeselink%2Fcdhere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteeselink%2Fcdhere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eteeselink","download_url":"https://codeload.github.com/eteeselink/cdhere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221486919,"owners_count":16830966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:12.122Z","updated_at":"2024-10-26T02:30:51.641Z","avatar_url":"https://github.com/eteeselink.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"CDHERE\n======\n\nA Windows command-line program that changes the current directory to \nwhatever directory the topmost Explorer window is looking at. \n\nIn other words, it is the reverse of the many \"[Open][1] [Command][2] \n[Window][3] [Here][4]\" tricks that exist for various versions of Windows.\nInstead of opening a new command window for each directory in which you want \nto do work, you move the current directory in an existing console to where you\nwant it to be.\n\nInstallation\n------------\n\n* Download \u003chttps://github.com/eteeselink/cdhere/raw/master/Downloads/cdhere-1.4.zip\u003e\n  and unzip it somewhere convenient.\n* Run `addToPath.cmd` with administrator priviledges to add the directory to\n  your PATH, so that you can acces `cdhere` from anywhere.\n\nUsage\n-----\n    \n    cdhere\n\nWhich looks like:\n\n    C:\\Users\\teeselinke\u003ecdhere\n    D:\\hobby\\cdhere\\cdhere\\src\u003e\n    \nInteractive mode\n----------------\n\nAdd a `/d` for an interactive version of plain `cdhere`. Usage is simple:\n\n    cdhere /d\n    \nThis will open a \"Browse to folder\" dialog, and your command-line window will change the current directory to the selected folder.\n\n\nUsage from Bash\n---------------\nIf you use Bash on Windows (e.g. through msys of cygwin), [ozh][9] recommends you add the following to your `~/.bash_profile`:\n\n```sh\nfunction cdhere {\n\tCDWHERE=$(c:/path/to/cdhere/cdwhere.exe)\n\tif [ \"$CDWHERE\" != \"\" ]; then\n\t\tcd $CDWHERE\n\tfi\n}\n```\n\nBackground\n----------\n\nWindows processes cannot change the directory of their parent process, but\nbatch files can. Therefore, `cdhere` consists of two files, a C++ program\ncalled `cdwhere.exe` which finds the topmost Explorer window and queries it\nfor its current directory, and `cdhere.cmd`, which uses `cdwhere.exe`'s \noutput to actually change the directory.\n\nBugs\n----\n\nPlease report bugs using GitHub's issue tracker at\n\u003chttps://github.com/eteeselink/cdhere/issues\u003e\n\nAcknowledgements\n----------------\n\nThe only not-entirely-trivial bit of this code is the part that asks an \nExplorer window where it's pointed. This, however, is something that Raymond \nChen (of [The Old New Thing][5] fame) already worked out for me [back in 2004]\n[6]. Much of the code you see here is little more than his example refactored.\n\nThe `/d` switch was contributed by [Danyil Bohdan][7]\n\nLicense\n-------\n[zlib license][8]\n\n[1]: http://www.mydigitallife.info/add-open-command-window-here-to-xp-folder-with-powertoy/\n[2]: http://stackoverflow.com/a/1225574/103395\n[3]: http://code.kliu.org/cmdopen/\n[4]: http://go.microsoft.com/fwlink/?LinkId=211417\n[5]: http://blogs.msdn.com/b/oldnewthing\n[6]: http://blogs.msdn.com/b/oldnewthing/archive/2004/07/20/188696.aspx\n[7]: https://github.com/dbohdan\n[8]: https://github.com/eteeselink/cdhere/raw/master/LICENSE.txt\n[9]: https://github.com/ozh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feteeselink%2Fcdhere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feteeselink%2Fcdhere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feteeselink%2Fcdhere/lists"}