Powershell & batch file

Welcome Forums General PowerShell Q&A Powershell & batch file

This topic contains 4 replies, has 3 voices, and was last updated by

 
Participant
6 months, 3 weeks ago.

  • Author
    Posts
  • #110759

    Participant
    Points: 5
    Rank: Member

    Hi all,
    I want make Folder and  get the Name from Parameter of PowerShell. Any Tips please or tutorial. Thanks alot.
    1.ps1
    [CmdletBinding()]Param(    [Parameter(Mandatory=$True)]   [string]$CityName
    )
    start .\2.bat
    —–
    2.bat
    call cdmcd C:\Users\alo\Desktopmkdir CityName
     

  • #110768

    Participant
    Points: 639
    Helping Hand
    Rank: Major Contributor
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$True)]   
        [string]$CityName
    )
    
    New-Item -Path ([environment]::GetFolderPath('Desktop')) -Name $CityName -ItemType Directory
    
    
  • #110774

    Participant
    Points: 1,671
    Helping Hand
    Rank: Community Hero

    Hi @majd , I hope you have understood Rob's reply. Just repeating what we have been suggesting from you previous questions. The solution given here is very basic and is easily doable if you would have started learning PowerShell from already shared links.

    I request you to give you time in learning PowerShell. If PowerShell is important for you giving benefits, you should really invest your time in learning it.

  • #110771

    Participant
    Points: 5
    Rank: Member

    Thanks alot.

  • #110779

    Participant
    Points: 5
    Rank: Member

    yes i should do it but i have exams nowadays  in University and i should learn PowerShell for my job

The topic ‘Powershell & batch file’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort