Recommended Posts

Here ya go. For these to work, you'll need to have XP or download the latest version of Windows Scripting Host from Microsoft - think it's v5.6.

'NewFolder.vbs

Option Explicit
Dim fso, ws, objArgs, Title
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("Wscript.Shell")
Set objArgs = WScript.Arguments
Title = "Create New Folder"

Call MakeNewFolder

Call Cleanup

Sub MakeNewFolder
Dim strArg, FolderTemp, FolderPath, NewFldr
For Each strArg in objArgs
FolderTemp = FolderTemp & " " & strArg
Next
FolderPath = Trim(FolderTemp)
NewFldr = InputBox("Name for New Folder?", Title, "New Folder")
If NewFldr = "" Then Call Cleanup
On Error Resume Next
fso.CreateFolder FolderPath & NewFldr
If Err.Number = 58 Then
Err.Clear:On Error GoTo 0
ws.Popup Chr(34) & NewFldr & Chr(34) & " already exists.", ,Title, 0 + 48 + 4096
Call MakeNewFolder
ElseIf Err.Number = 52 Then
Err.Clear:On Error GoTo 0
ws.Popup Chr(34) & NewFldr & Chr(34) & " contains invalid character(s).", ,Title, 0 + 48 + 4096
Call MakeNewFolder
End If
End Sub

Sub Cleanup
Set ws = Nothing
Set fso = Nothing
WScript.Quit
End Sub  

'NewTextDoc.vbs

Option Explicit
Dim fso, ws, objArgs, Title 
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("Wscript.Shell")
Set objArgs = WScript.Arguments
Title = "Create New Text Document"

Call MakeNewDoc

Call Cleanup

Sub MakeNewDoc
Dim strArg, FolderTemp, FolderPath, NewDoc
For Each strArg in objArgs
FolderTemp = FolderTemp & " " & strArg
Next
FolderPath = Trim(FolderTemp)
NewDoc = InputBox("Name for New Document?", Title, "New Text Document")  
If NewDoc = "" Then Call Cleanup
On Error Resume Next
fso.CreateTextFile FolderPath & NewDoc & ".txt", False
If Err.Number = 58 Then
Err.Clear:On Error GoTo 0
ws.Popup Chr(34) & NewDoc & Chr(34) & " already exists.", ,Title, 0 + 48 + 4096
Call MakeNewDoc
ElseIf Err.Number = 52 Then
Err.Clear:On Error GoTo 0
ws.Popup Chr(34) & NewDoc & Chr(34) & " contains invalid character(s).", ,Title, 0 + 48 + 4096
Call MakeNewDoc
End If
End Sub

Sub Cleanup
Set ws = Nothing
Set fso = Nothing
WScript.Quit
End Sub  

Is there anyway to make it act like the default New Folder/New Text Document menu items do? By that, I mean just have 'em make the folder/file with a default name, and not pop up a dialog like it currently does. I've played with the vbs source a bit, but so far everything I do breaks the script. :D

Edit: Alright, I got it to make a directory/text file without asking for a name, but if it already exists the script goes into an infinite loop. Is it possible to do something like..

if 'NewFoldr' exists

NewFoldr = "New Folder (2)"

Same thing with the New Text Document script.

Edited by RaGe-

RaGe- Something like this you mean?

'NewFolder.vbs
'Version 1.1 for RaGe-

Option Explicit
Dim fso, ws, objArgs, Count
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("Wscript.Shell")
Set objArgs = WScript.Arguments
Count = 0

Call MakeNewFolder

Call Cleanup

Sub MakeNewFolder
Dim strArg, FolderTemp, FolderPath, NewFldr
For Each strArg in objArgs
FolderTemp = FolderTemp & " " & strArg
Next
FolderPath = Trim(FolderTemp)
If Count = 0 Then
NewFldr = "New Folder"
Else
NewFldr = "New Folder (" & Count & ")"
End If
On Error Resume Next
fso.CreateFolder FolderPath & NewFldr
If Err.Number = 58 Then
Err.Clear:On Error GoTo 0
Count = Count + 1
Call MakeNewFolder
End If
End Sub

Sub Cleanup
Set ws = Nothing
Set fso = Nothing
WScript.Quit
End Sub ?

'NewTextDoc.vbs
'Version 1.1 for RaGe-

Option Explicit
Dim fso, ws, objArgs, Count 
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("Wscript.Shell")
Set objArgs = WScript.Arguments
Count = 0

Call MakeNewDoc

Call Cleanup

Sub MakeNewDoc
Dim strArg, FolderTemp, FolderPath, NewDoc
For Each strArg in objArgs
FolderTemp = FolderTemp & " " & strArg
Next
FolderPath = Trim(FolderTemp)
If Count = 0 Then
NewDoc = "New Text Document" 
Else
NewDoc = "New Text Document (" ?& Count & ")"
End If
On Error Resume Next
fso.CreateTextFile FolderPath & NewDoc & ".txt", False
If Err.Number = 58 Then
Err.Clear:On Error GoTo 0
Count = Count + 1
Call MakeNewDoc
End If
End Sub

Sub Cleanup
Set ws = Nothing
Set fso = Nothing
WScript.Quit
End Sub ?

BTW, please note that I'm not exactly a vbscript guru. It took me about a month to get these scripts working in the first place so no really difficult questions pleas:D :D

Did it anyway :D

'Begin code for FileExtXP.vbs
'Version: 1.0 - Windows XP (October 9, 2003)

Option Explicit
Dim WSHShell, RegKey, FileExt
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
FileExt = WSHShell.RegRead (RegKey & "HideFileExt")

If FileExt = 1 Then ? 'File extensions hidden
 ? ? ?WSHShell.RegWrite RegKey & "HideFileExt", 0, "REG_DWORD" ? 'Show file extensions
Else
 ? ? ?WSHShell.RegWrite RegKey & "HideFileExt", 1, "REG_DWORD" ? 'Hide file extensions
End If

WSHShell.SendKeys "+{F10}e" ? 'Refresh

Actually, I have a bit of a question...

Neither the New Text Doc nor the New Folder scripts work. I can double-click them in the folder I hold them in and they do what they're supposed to, but when I use the context menu they don't work... Any suggestions?

First of all, I have to say, THANK YOU!!! These vbs scripts are awesome and very useful, especially the show file extensions and show/hide folders.. I've seen the New Folder option in other tweak progs. Just one thing, however. I can't seem to get the New folder vbs to work. Well, actually, it does work but it creates the new folder in Documents and Settings\Gabe Flores directory instead of the directory i'm currently in. Any suggestions? Thanks again!

ps: do you know of a way to remove a bunch of junk from the context menu, such as "move to folder" and "customize this folder" and the Windows Media Player context menu, among other things? Thanks.

Edited by gflores
do you know of a way to remove a bunch of junk from the context menu, such as "move to folder"  and "customize this folder" and the Windows Media Player context menu, among other things? Thanks.

Download a program called X-Setup. This will let you remove a bunch of stuff from your context menus.

As far as I can remember, to remove the WMP context menu options you have to unregister a dll. Try typing

regsvr32 /u wmpshell.dll

in the run box.

If you need any more help just let me know :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft Flight Simulator's City Update 15 enhances Midwest cities by Pulasthi Ariyasinghe The third major city update of the year has landed for the original Microsoft Flight Simulator and the 2024 release. The latest drop is upgrading the visuals and regional accuracy of three metropolitan regions in the American states of Illinois, Minnesota, and Wisconsin. The 15th city update is adding eight new areas of interest that have been enhanced with high-fidelity TIN (triangulated irregular network) surface texturing in the mentioned regions. The free update highlights Chicago, Elgin, Cicero, and Arlington Heights in Illinois, as well as Minneapolis, St. Paul, Bloomington, Duluth, Brooklyn Park, Woodbury, Lakeville, Plymouth, and Blaine in Minnesota. In Wisconsin, the development has also upgraded the lands and buildings of Milwaukee, Madison, and Racine. The update lands just as one of the world's largest enthusiast flight simulation conventions, FlightSimExpo, kicks off in downtown St. Paul, Minnesota, on June 14. The Flight Sim development team's 40-minute keynote at the event can be watched here. At the same time, Microsoft is bringing the 6-seat, single-engine, multi-use light civil airplane Piper M600 into the game as a part of its Expert Series 2 program. This premium plane can be purchased from the in-game marketplace for $24.99. City Update 15: The United States Midwest is now available in Microsoft Flight Simulator, as well as the newer Microsoft Flight Simulator 2024, as an optional download. It can be accessed across Steam and the Microsoft Store for PC, Xbox Series X|S, and PlayStation 5, as well as Xbox and PC Game Pass subscriptions. Xbox One, mobile, and PC players can also jump into the new content using Xbox Cloud Gaming if they have a Game Pass Ultimate membership. The game must be updated to the latest version to download this free update from the in-game marketplace.
    • Five things you might have missed during Apple's WWDC 2026 by Aditya Tiwari Image: Apple Apple's annual developer event, WWDC 2026, happened from June 8 through June 12. We have already covered several new features and updates that the iPhone maker unveiled during the official keynote. Apple took Google's help and finally announced the upgraded Siri AI personal assistant, which now comes with an app. Moreover, a truckload of Apple Intelligence features took the center stage. That said, this year's WWDC is a bit different, and you might have noticed or missed the following stuff: Apple's ongoing unification of platforms Image: Apple One thing Apple is widely known for is its seamless hardware-software ecosystem. The company added a new chapter in 2020, when it began the Apple Silicon transition and launched macOS 11 Big Sur with native ARM support. Some major changes happened last year as well, when Apple renamed all of its operating systems to version 26 and introduced the Liquid Glass design language. Until WWDC 2025, Apple keynotes had dedicated segments for iOS, iPadOS, macOS, watchOS, and other operating systems, in which the company discussed each in detail. The WWDC 2026 keynote was different, and Apple allotted most of the screen time to Apple Intelligence and Siri. It didn't even publish separate press releases on its website for different operating systems. While it might seem surprising at first, it shows how Apple plans to move forward with its software ecosystem. Be it the Liquid Glass changes, child safety updates, or other features, they are mostly rolling out across multiple platforms. In other words, Apple is slowly blurring the line between its operating systems and achieving feature parity wherever possible. It's easy to rule out that someone in Apple's marketing team forgot to press the publish button. Everything is a calculated move when it comes to a company like Apple. Putting Apple Intelligence left, right, and center hints that the OS itself is no longer the product anymore. It's Siri, not Pepsi Time and again, various Apple products have been compared to unrelated things and turned into meme material. You might have heard about the "cheese grater" Mac Pro or the "trash can" Mac Pro, to name a few. It's Siri's turn this time. The upgraded AI assistant got a fresh logo, and people have started comparing it with Pepsi. There are other contenders, such as the Sony Ericsson logo and the Yin and Yang symbol. Shot on iPhone. Edited on Mac Image: Apple Apple has been putting the iPhone's camera muscles to the test on various occasions. Even NASA astronauts took it to Space earlier this year and captured some out-of-this-world photos. Recently, Apple TV streamed the first major live sporting event shot entirely on iPhone 17 Pro: an MLS match featuring the LA Galaxy vs. the Houston Dynamo FC. The 'Pro' iPhone has also been used to shoot Apple events in recent years. It's "Scary Fast" Mac event in 2023 was among the earliest attempts, and the tradition trickled down to the WWDC 2026 keynote, which ended with the tag line "Shot on iPhone. Edited on Mac." It's unsurprising to see Apple flexing the camera capabilities of its Pro models, especially when it has been baking professional-grade features, including ProRes RAW and Genlock. Hints for the foldable Apple has been sitting on the foldable iPhone for so long. There is still confusion over when the company will make it official. A recent report said that the iPhone Fold might get delayed as Apple is struggling to perfect its hinge mechanism. But Apple has been dropping hints here and there. A developer dug into the iOS 27 beta code and found internal references about device folding states. As verified by Macworld, the code includes references to "foldState" and "angleDegrees" internal status values, which are apparently designed to tell apps if a device is folded and at what angle. As of now, no other Apple device uses these states. The publication also found internal code suggesting Apple has been testing a device with both Touch ID and Dynamic Island, a combo that doesn't exist today. Last event as Apple CEO Image: Apple Tim Cook's bond with Apple is now almost three decades old, having started in 1998 as the SVP of Worldwide Operations. Back in August 2011, Steve Jobs stepped down as Apple CEO months before his passing, and Cook took charge. Now, the baton has been passed to the hardware chief, John Ternus, who will take over the role on September 1. WWDC 2026 is the last major Apple Event for Tim Cook as CEO. We have seen so much during Cook's tenure over the years, much of which defines Apple as we know it today. From new hardware product lines like Apple Watch, AirPods, Apple Vision Pro, and Apple Silicon, to boosting Apple's services business with Apple Music, Apple TV, Apple Pay, Apple Arcade, Apple Fitness+, Apple Care One, and more. That said, the first developer betas for Apple's latest operating systems are now available. You can check if your device is supported on iOS 27, iPadOS 27, macOS 27 Golden Gate, watchOS 27, and other platforms. What's your favorite feature that Apple announced this year at WWDC 2026? Tell us in the comments.
    • Trailer park trash “sport “, fits the current White House
    • KataLib 5.3.0.0 by Razvan Serea KataLib is more than just a music player — it's a complete audio suite designed for music lovers and creators alike. It combines a powerful audio player, a flexible metadata editor, a capable audio converter, and a music library manager into one streamlined application. Core Features: Audio Player Enjoy seamless playback of virtually any audio format or even streaming video files. DJ Mode lets you mix tracks with manual or automatic crossfades. You can also load and save WinAmp-style playlists for quick access to your favorite sets. Audio Converter Convert between a wide range of audio formats effortlessly. Trim or normalize your output automatically, and even extract audio from streaming video sources. Ideal for preparing files for different devices or platforms. Metadata Editor View and edit ID3v2 tags and other metadata. Batch edit multiple files at once, and fetch missing information directly from the MusicBrainz database. You can also apply or update album art with ease. Music Library Manager Organize your entire audio collection, search across tracks instantly, and download cover images from the internet — or use your own custom artwork. KataLib makes it easy to keep your library tidy and enriched with useful info. Supported Formats: KataLib supports a wide range of both lossy and lossless audio formats: Input: OPUS, AAC, FLAC, M4A, MP3, MP4, MPC, APE, AIF, MKV, AVI, MOV, FLV, WEBM, Ogg Vorbis, WAV, WAVPack, WMA, AC3, OGA, MP2, MPGA, MPEG, DTS, M4B, DSD (DFS) Output: OPUS, FLAC, M4A, MP3, Ogg Vorbis, WAV Under the hood, KataLib uses the trusted FFmpeg engine for audio conversion and media playback, ensuring compatibility with virtually all mainstream media formats. KataLib 5.3.0.0 changelog: Added Option to select the Zoom level of the Oscilloscope visualizer. The taskbar button of the app now displays the progress of its processing tasks. The metadata text of the Visualization Video can now be aligned by the user. We can now reorder the order of the Visualizers and Metadata, in the Visualization Video Setup dialog, by removing any item and adding it again. It will be added at the end. Changed The font size of the Visualization Video can now be more than 30 points. Updated yt-dlp library to version 2026... Fixed Opening the Visualization Video Setup dialog could fail if the settings were wrong. Sometimes there were false duplicates in the Rename Tracks dialog. Tracks without metadata appeared without title in the Recent menu. Download: KataLib 5.3.0.0 | 90.0 MB (Open Source) Links: KataLib Home Page | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      +Edouard
      173
    3. 3
      PsYcHoKiLLa
      138
    4. 4
      ATLien_0
      94
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!