Tag Archive: files

Mar 25

Powershell Tips of the week #3 – Find parent folder

How to find the parent folder of a path that is stored in a variable For the purpose of the example I will manually add a path to a variable. $VarA = "\\Domain.net\dfs\files\dan.fortier\" The parent folder of this path is “\\Domain.net\dfs\files” but lets find it with powershell using the Get-Item cmdlet. $ParentFolder = (Get-Item $VarA).parent.FullName …

Continue reading »

Jan 28

How to: Create empty files with specific size

This is just a quick post on how to create a huge file in 2 second. In this example I will create a 1gb file: -Open “Command Prompt” (Start / Run / cmd / Enter) -Use this command: fsutil file createnew <filename> <size> fsutil file createnew C:\1gb_files.out 1073741824 -< filename > is the name of …

Continue reading »