An open API service indexing awesome lists of open source software.

https://github.com/hmz777/New-File-Tool

A tool that lets you create empty files on the fly wherever you want.
https://github.com/hmz777/New-File-Tool

csharp material-design netframework netframework47 pinvoke productivity tool winforms

Last synced: 12 months ago
JSON representation

A tool that lets you create empty files on the fly wherever you want.

Awesome Lists containing this project

README

          





GitHub
GitHub release (latest by date)
GitHub Release Date
GitHub last commit

# New File Tool
Basically, this is a tool that lets you create empty files on the fly wherever you want.

# Why?
Well I always find myself creating .bat and .ps1 files that aren't present in the New Context menu and adding every file that I want to the menu using the registry ShellNew key was ugly so I created this tool.

# How?
The app uses Pinvoke to grab the **Active Windows Explorer** window you're working in, get the path that is open in it, and set it as the path that you'll be creating paths relative to.
If it doesn't find an **Active** "explorer.exe" window, it creates your file on the desktop directory.

# Features
- The app registers a System-wide Hot Key (L-Shift + Q), a combination of keys that when pressed can activate the app and bring it to the topmost.
- Can create full paths, not just files i.e, "dir\file.txt" creates a directory with the name "dir" and "file.txt" inside it.
- You can add file attribute flags so you can mark the file as `hidden`, `system`, or `readonly`.
Something like this: ***\dir1\dir2\file.txt > -h -s -r***.
- If you don't have an **active** "explorer.exe" window or you're in a special system folder like the root directory "This PC" or "Recycle Bin" the app creates your file on the desktop directory.
- The app starts minimized with a tray icon and can be brought to the front via the tray context menu with the "Show" button or via the defined HotKey.

# Binaries
[Download NewFileTool](https://github.com/hmz777/New-File-Tool/releases/download/v1.1/NewFileTool.zip)

# Notes
Most of the code that you'll see in this repository is from [Pinvoke](http://www.pinvoke.net/) and StackOverflow. I only stitched them together and added some code of my own to create this tool.

# Development Notes
This project references the following COM libraries:
- Microsoft Shell Controls And Automation
- Microsoft Internet Controls

You don't have to reference them, I only did it to expose the **Shell, ShellWindows, and InternetExplorer** types in the [Tools](https://github.com/hmz777/New-File-Tool/blob/master/Helpers/Tools.cs) Class for IntelliSense purposes only, you can just leave them as dynamic and compile. See [here](https://github.com/hmz777/New-File-Tool/blob/33dbba8669db3ca1067573a9ce17839c6b3471a2/Helpers/Tools.cs#L32).

# Upcoming Features
- ~~I will be adding file attribute flags so you can mark the file as `hidden`, `system`, or `readonly`. Something like this: ***\dir1\dir2\file.txt > -h -s -r***~~ Done! :white_check_mark:
- An option for entering absolute paths instead of relative ones.

# Author
Hamzi Alsheikh

Website: [https://www.hamzialsheikh.tk](https://www.hamzialsheikh.tk)