- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a temporary file using PowerShell?
To create a temporary file with the PowerShell, we can use the New-TemporaryFile command. This command creates a temporary file tmp<NNNN>.tmp where NNNN represents the random hexadecimal number.
Example
PS C:\> New-TemporaryFile Directory: C:\Users\Administrator.AUTOMATIONLAB\AppData\Local\Temp Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 4/10/2021 9:14 PM 0 tmpF624.tmp
The output path is selected based on the path defined at Path.GetTempPath()
- Related Articles
- How to create a unique temporary file name using Python?
- Golang program to create a temporary file
- Create a temporary file in Java
- How to create a CSV file manually in PowerShell?
- How to generate secure temporary file name using Python?
- How to convert JSON file to CSV file using PowerShell?
- How to delete a temporary file in Java?
- How to create a dummy file of any size with PowerShell?
- Create temporary file in specified directory in Java
- How to install MSI file using batch file in PowerShell?
- How to append data into a CSV file using PowerShell?
- How to search in the file using PowerShell?
- How to edit the CSV file using PowerShell?
- How to mount the ISO file using PowerShell?
- How to dismount the ISO file using PowerShell?

Advertisements