2

I am unable to understand the working of pushd,popd and robocopy commands in powershell.Can anyone please explain in layman terms?

2 Answers2

3

To get help in PowerShell, you can user the Get-Help cmdlet :

Get-Help pushd

Get-Help popd

You can use the -Examples switch to get usage examples.

robocopy is not a PowerShell cmdlet, it's a native command, so you can see its help via :

robocopy /?

If you want a example of how robocopy can be used in PowerShell you can see this question Custom RoboCopy Progress Bar in PowerShell

Community
  • 1
  • 1
sodawillow
  • 12,497
  • 4
  • 34
  • 44
3

I am not sure what you mean by layman's terms.

Conceptually the operations of PUSH and POP are traceable to the two most basic operations that can be performed on a stack. A stack of data is like a stack of hay. You put more hay on at the top, and the first hay you take off is the last hay you stacked on. This makes a haystack a LIFO (Last-in First-out) structure.

When you stack data, the last item you PUSH onto the stack will be the first item you POP off of the stack. For more details, look up LIFO.

The origin of the words PUSH and POP for these two operations is obscure, but it seems to go back as far as Bauer in 1957. I can trace it back as far as the 1960s at MIT.

Robocopy refers to a "robust" copying program that was used in certain circumstances where the DOS copy command just would not do what needed to be done. There were earlier implementations with different names, see XCOPY.

Walter Mitty
  • 18,205
  • 2
  • 28
  • 58