Format files and folders

In dbForge Studio for SQL Server, you can bulk format multiple files or file directories.

1. Select Tools > SQL Formatter.

The expanded Tools menu

2. Select the formatting mode:

  • Files: Format a single file or multiple files.
  • Directories: Format all files of a specific type within one or more folders.

The Formatting mode page of the SQL Formatter Wizard

3. Click Next.

4. Click Add and select the required files or directories on your computer.

5. Specify additional options:

  • For files:

    By default, formatted files open for review. To save them automatically without opening, clear the Keep modified files open after formatting checkbox.

    The File list page of the SQL Formatter Wizard

  • For directories:

    • Under Look at these file types, select the file types to format:
      • .sql – Only files with the .sql extension will be included.
      • . – All file types will be included, regardless of their extension.
    • By default, formatted files open for review. To save them automatically without opening, clear the Keep modified files open after formatting checkbox.
    • By default, formatting applies to files in the selected directories and their subdirectories. To ignore files in subdirectories, clear the Include sub-folders checkbox.

    The Folder list page of the SQL Formatter Wizard

Tip

To remove a file or directory from the list, select it and click Remove.

6. Click Format to start formatting.

The Formatting progress window appears.

7. After all files are processed, click OK.

The Formatting progress window