SQL Server DBA

Drop a SQL Server database with a script

How to delete a SQL Server database with a script? And delete all associated files? These files are the .mdf, .ndf, .ldf files and also the .bak backup files. Use the SQL Server Drop database command as below. With a check beforehand to avoid errors. It runs the command only if the SQL Server database exists on the given server and instance. Create a

Excel Tips

Create an Excel table

Create an Excel table from a data area. How to create an Excel table and sort, format and filter its columns? Then filter the data? First create the required rows and columns. Fill the table with data and turn it into a table with headers. In the form of a table, it is possible to sort and filter the data easily. An Excel table

Excel Tips

Create and open a new Excel workbook

How to create and open a new Excel workbook? What is the Excel spreadsheet? Excel is a software from the Microsoft Office suite. An Excel file is also called an Excel workbook. Like a traditional physical workbook, it consists of sheets but also tables and cells. First of all, the Excel sheets are actually tabs. Tables and lists can be created. These tables and

Excel Tips

Open two Excel files in separate windows

How to open two Excel files in separate windows at the same time? Open two Excel files in separate windows seems easy, yet by default, Windows 10 opens both files in the same software, i.e. Excel 2016. So you have to navigate between the files, but can’t see them at the same time. It is therefore useful to have two windows, or even better,


Delete a file with cmd

To delete a file with a Windows script, it is recommended to use the cmd del command. The del or delete command provides many very useful options to be in control of the deletion process. The Command Prompt is a text-based user interface that enables users to execute commands and perform scripted tasks with their computer. It’s a powerful tool that can be used


Create a text list of files in a folder with cmd

How to create a list of all Windows files contained in a folder and insert it into a text file with a cmd command? It pretty easy and it is the combination of two MS-DOS scripts, you need to add in the command to redirect the output of the dir batch comand. 1. How to create a list of the files in a folder


List files recursively with cmd in folders and subfolders

List all the files contained in a folder and its subfolders recursively with a cmd script. Per default, use the cmd tool with the dir command allows to list all files and folders within a given folder, but not recursively. To display a complete of files and optionally folders within all the subfolders, use the dir command options as follows. Cmd scripts to list


List files in folder with cmd

When it comes to listing huge directories in Windows, it’s mandatory to use scripting to avoid a tremendous manual work. Automation is key here, with very simple bash commands windows system can do all the work. How to list all files in a folder with a Windows command line? Use the dir command line to display the full list of files inside a specific