About 50 results
Open links in new tab
  1. powershell - Create directory if it does not exist - Stack Overflow

    When it does not, it will create a new directory. If the path exists but is a file, New-Item will raise an error (you can overwrite the file by using the -force argument if you are risky).

  2. powershell - Create a subdirectory/subfolder - Stack Overflow

    I'm creating a PowerShell script to "compile" a bunch of documentation spread across my notes. I'd like to create the directory structure first, then copy files into the newly created directories....

  3. directory - What is the `mkdir -p` equivalent in Powershell? - Stack ...

    Feb 4, 2022 · In other words, in Powershell, how to create directories recursively, and not fail if each directory level already exist ?

  4. powershell - Should Copy-Item create the destination directory ...

    The -recurse option only creates a destination folder structure if the source is a directory. When the source is a file, Copy-Item expects the destination to be a file or directory that already exists.

  5. Powershell 'Move-Item' doesn't make directory if it doesn't exist

    Dec 17, 2019 · 6 You could use the system.io.directory .NET class to check for destination directory and create if it doesn't exist. Here is an example using your variables:-

  6. PowerShell Create Folder on Remote Server - Stack Overflow

    The following code will create a new folder on a remote server using server name specified in $server. The below code assumes credentials are stored in MySecureCredentials and setup beforehand.

  7. Create a folder structure using PowerShell - Stack Overflow

    Feb 20, 2018 · You could also create a list of your subfolders using @('folder1' ,'folder2', ...) and iterate over these subfolders to create them. The following example uses the Join-Path cmdlet to combine …

  8. Create a temporary directory in PowerShell? - Stack Overflow

    Jan 1, 2016 · PowerShell 5 introduces the New-TemporaryFile cmdlet, which is handy. How can I do the same thing but instead of a file create a directory? Is there a New-TemporaryDirectory cmdlet?

  9. Creating hard and soft links using PowerShell - Stack Overflow

    May 28, 2017 · Can PowerShell 1.0 create hard and soft links analogous to the Unix variety? If this isn't built in, can someone point me to a site that has a ps1 script that mimics this? This is a necessary fu...

  10. Creating folders and moving files in powershell - Stack Overflow

    Jul 8, 2021 · 0 What you basically need to do, is to: Get a list of files in a selected folder through PowerShell. Create new folders in a loop by using the New-Item cmdlet which have name made by …