The flattemp command in Windows

Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.

The flattemp command enables or disables temporary flat folders. For an example of how to use this command, please see the example below.

Syntax of flattemp command

 flattemp {/query | /enable | /disable} 

Parameters

ParameterDescription / query Current installation query. / enable Enable temporary flat folders. Users will share the same temporary directory, unless the temporary directory is in the home directory of a particular user. / disable Disable temporary folders. Each user's temporary directory will be in a separate directory (identified by that user's session ID). /? Show help at the command prompt.

Note

  1. The flattemp command is only available when you have installed the Terminal Server role service on a computer that is running Windows Server 2008 or rd Session Host role service on a computer that is running Windows Server 2008 R2.
  2. You must have admin rights to run the flattemp command .
  3. After each user has a temporary directory, use the flattemp / enable command to enable temporary flat directories.
  4. The default method for creating temporary folders for many users (usually specified by TEMP and TMP environment variables ) is to create subdirectories in the Temp directory , using the logonID as a subdirectory name. For example, if the TEMP environment variable points to C: Temp, the temporary directory is assigned to the user logonID 4 as C: Temp4. Using the flattemp command , you can point directly to the Temp directory and prevent the creation of subdirectories. This is useful when you want the user's temporary folders to be contained in the main directories, whether on local drive rd Session Host server or on a shared network drive. You should only use the flattemp / enable command when each user has a separate temporary directory.
  5. You may experience an application error if a user's temporary folder is on a network drive. This happens when shared network drives are inaccessible for a while on the network. Because the application's temporary files are inaccessible or out of sync, it responds as if the drive has stopped working. Do not transfer temporary folders to network drives. The default is to keep temporary folders on the local hard drive. If you encounter something different or drive-related errors with certain applications, stabilize your network connection or move temporary folders back to the local hard drive.
  6. If you disable using separate temporary folders for each session, flattemp settings will be ignored. This option is placed in the Remote Desktop Services Configuration tool.

For example

To display the current settings for temporary flat folders, enter:

 flattemp / query 

To enable temporary flat folders, enter:

 flattemp / enable 

To turn off temporary flat folders, enter:

 flattemp / disable 

See more:

  1. Finger command in Windows
  2. Eventcreate command in Windows
  3. Expand command in Windows
4 ★ | 1 Vote

May be interested

  • Instructions for using Command PromptInstructions for using Command Prompt
    deep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
  • Rd command in WindowsRd command in Windows
    the rd command helps delete a directory
  • Cmd command in WindowsCmd command in Windows
    the cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
  • How to use the command history function in Command PromptHow to use the command history function in Command Prompt
    command prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
  • The sfc command in WindowsThe sfc command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Reg command copy in WindowsReg command copy in Windows
    to copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
  • Fc command in WindowsFc command in Windows
    the fc command compares two files or a collection of files and displays the differences between them.
  • The echo command in WindowsThe echo command in Windows
    the echo command displays the message or turns on / off the command repeat feature. if used without parameters, the echo command will display the current echo setting.
  • Xcopy command in WindowsXcopy command in Windows
    the xcopy command is a command prompt command used to copy one or more files or folders from one location to another. with many options and the ability to copy entire directories, the xcopy command is similar to, but much more powerful, than the copy command.
  • The cacls command in WindowsThe cacls command in Windows
    the cacls command displays or modifies an arbitrary access control list (dacl) on the specified file. the command applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012.