Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: get Directory Size

$
0
0

Hi Everybody,
I am going to put my powershell scrip in batch file ( here is my batch file : c:\windows\system32\WindowsPowerShell\v1.0\PowerShell.exe -Command “Get-childitem –Path c:\windows\temp –recurse –Force | measure-object –property Length –Sum | select-object Count, Sum” > c:\myfolder\output.txt ).
When I run my command ( Get-childitem –Path c:\windows\temp –recurse –Force | measure-object –property Length –Sum | select-object Count, Sum > c:\myfolder\output.txt ) in powershell window, it works, but it does not work from the batch file. I worked on it several hours. Can somebody tell me why it does not work from batch file?
Sorry for my English , and thanks for your help!


Viewing all articles
Browse latest Browse all 13067

Trending Articles