Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Generate Random File Name

$
0
0

Summary: Use Windows PowerShell to generate a random file name.

Hey, Scripting Guy! Question How can I use Windows PowerShell to generate a random file name so I can ensure that
           a file I create does not have a naming conflict?

Hey, Scripting Guy! Answer Use the GetRandomFileName static method from the System.IO.Path .NET Framework
           class, for example:

[System.IO.Path]::GetRandomFileName()


Viewing all articles
Browse latest Browse all 3333

Trending Articles