Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    322

    Default Any way to create new text file anywhere?

    Hey ya guys

    Just got a quick question, Im aftering a method that can allow me to create a new text file in a folder in an instant. Something along the line of a hotkey or via the context menu. And I dont mean the traditional Right Click>New>Text Document. I need something that I can do within a click or a press of a button.

    At the moment Ive been searching for some hacks or mods the explorer tool bar to incorporate this function, but sadly such usage on creating a new text file is not so common.

    So if any one has some tips or hints on the ability to create new text document in an instant or within a click or press of a button, please let me know

    Thank you guys in advance

  2. #2
    Computer Technician wainuitech's Avatar
    Join Date
    Aug 2007
    Location
    Wellington
    Posts
    28,256

    Default Re: Any way to create new text file anywhere?

    Do you want it to open with a new blank txt file, or a shut one as you described with the right click.

  3. #3
    Member
    Join Date
    Jan 2005
    Posts
    322

    Default Re: Any way to create new text file anywhere?

    Yeah, pretty much just a new text document in a folder like it would be as if I used the usual right click>new>... method. But if it is able to be opened up after it is created, I am also fine with that, would save me a few clicks to get it opened ^^

  4. #4
    Pedantic Bloke Sweep's Avatar
    Join Date
    Jan 2006
    Location
    Tokoroa
    Posts
    7,671

    Default Re: Any way to create new text file anywhere?

    Probably a batch file or script would be the way to go.

    Here's a mthod to create a text file with a file list in it. And add to the right click menu.

    http://www.theeldergeek.com/file_list_generator.htm
    Last edited by Sweep; 17-05-2010 at 10:34 PM.

  5. #5
    Member
    Join Date
    Dec 2004
    Location
    NZ
    Posts
    44,851

    Default Re: Any way to create new text file anywhere?

    Well if you wanted to use notepad, you could just put a hotkey under its properties alongside shortcut key. You wouldnt have to make a shortcut for it .

    It wouldnt be in any particular folder. But, all you would do, is press a key / an F key, and it'll run

  6. #6
    Member
    Join Date
    Jan 2005
    Posts
    322

    Default Re: Any way to create new text file anywhere?

    Hey ya guys

    Thanks for the prompt update.

    The site's instruction is close to what Im looking for, just now need to find a way to call it in any folder and pick up its dir...majority of the time, the text file would be created inside the folder, rather than prior to entering the folder. Though great stuff, does give me a some more ideas on how I can go about doing this.

    As for the notepad shortcut property, I did look into that, but sadly the need to Save As is a put off ><. Very close but not quite there v_v

  7. #7
    Member
    Join Date
    Jan 2005
    Posts
    322

    Default Re: Any way to create new text file anywhere?

    Hey ya guys

    Sort of managed to get a work around for the problem. This is for future reference for anyone who is aftering the same functionality.

    1. Create a .bat file with the following command
    -------------
    IF EXIST info.txt goto exists
    echo on>info.txt
    exit
    goto end
    :exists
    echo on>info2.txt
    exist
    :end
    -------------

    2. Create a semi-context menu link to the file by creating a new registry key with a command key under [HKEY_CLASSES_ROOT/*/shell]

    Example: HKEY_CLASSES_ROOT/*/shell/NewTxt/Command

    3. Change the Command Default value to the path of where the .bat file was save/located at.

    Example: C:\addnewtxt.bat

    So now, whenever you right click on a file in any folder, a NewTxt command will be available for you to create a new text file. However right clicking in empty space within any folder wont give the correct context menu with the NewTxt command.



    Although my problem is slightly solve, Im still abit unsatisfied. For 2 reasons:

    1. The code cant detect existing info.txt files. Does any one know how I can modify the code to detect existing info.txt file and create another with an auto-increment number? Btw, Im no coder, hence the question ^^

    2. The NewTxt command only displays in the context menu when clicked on a file, not in empty space. Anyone know how I can move the command into your typical context menu, where it will display it when right click in an empty space in a folder?


    Thank you in advance ^^

  8. #8
    Senior Member MushHead's Avatar
    Join Date
    Jun 2006
    Posts
    510

    Default Re: Any way to create new text file anywhere?

    I notice in the registry that there is a key called

    HKLM\SOFTWARE\Classes\Directory\Background\shellex \ContextMenuHandlers\

    Looks like where you should be starting...
    There are 10 types of people in this world - those who understand binary, and those who don't.

  9. #9
    Computer Technician
    Join Date
    Feb 2006
    Location
    North Shore, Auckland
    Posts
    166

    Default Re: Any way to create new text file anywhere?

    To create a system where the number increments each time you create another, you would need to use a FOR loop. For more details type FOR /? at the command prompt or search Google.

  10. #10
    Junior Member
    Join Date
    Dec 2004
    Posts
    58

    Default Re: Any way to create new text file anywhere?

    FWIW, I just create shortcuts to Word Pad & New Word Doc, then drag them down to the Task Bar. May need to unlock it.
    Left click opens them, always visible, can delete the Desktop shortcuts if wanted.
    Don

Similar Threads

  1. Excel create tmp file
    By dthlau in forum PressF1
    Replies: 2
    Last Post: 09-12-2008, 08:24 PM
  2. linux: create a file with the date as the name?
    By wawape**s in forum PressF1
    Replies: 2
    Last Post: 29-07-2007, 01:04 PM
  3. Replies: 4
    Last Post: 14-06-2006, 08:16 AM
  4. Create a swf (flash) file?
    By Steve_L in forum PressF1
    Replies: 2
    Last Post: 24-09-2004, 03:17 PM
  5. How do I create a .vbs file?
    By *Sparky* in forum PressF1
    Replies: 6
    Last Post: 18-07-2003, 09:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •