When it comes to managing data, IT admins often need to quickly create multiple folders and name them in an organized and efficient manner. While it’s easy to create one folder at a time, doing so for multiple folders can be tedious and time consuming. Fortunately, there is a way to create multiple folders and name them by reading lines from a text file.
The first step in creating multiple folders and naming them is to create a text file containing the list of desired folder names. This text file should contain one folder name per line in the desired order. It is important to remember that the folder names should not contain any non-alphanumeric characters since these are not supported by Windows. It is also important to make sure that the file is saved as plain text. After creating the text file, the next step is to open the Command Prompt. This can be done by typing “cmd” into the search box of the Start Menu.
Once the Command Prompt is open, the next step is to navigate to the desired folder location. This can be done by using the command “cd” followed by the folder path. It is important to note that paths should be surrounded by quotation marks if there are any spaces in the path. After navigating to the desired folder location, the next step is to enter the command “for /f %i in (filenames.txt) do md “%i””. This command will create a folder for each line in the text file.
The command “for /f %i in (filenames.txt) do md “%i”” can also be used to create multiple subfolders in an existing folder. To do this, the command should be entered while in the desired parent folder. The command will then create a subfolder for each line in the text file. It is important to note that the name of the text file should be changed appropriately in the command.
After entering the command, the folders and subfolders should be immediately created in the desired location. It is important to remember that the text file should be properly formatted and saved as plain text before entering the command. This is the most efficient way to create multiple folders and name them by reading lines from a text file. Doing so can save IT admins a lot of time and effort when managing data.