Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Run artbitrary command on every item in a directory tree in PowerShell?

$
0
0

On Command Prompt I can enumerate all files in a directory tree and run an arbitrary command on all of them with either:

FOR /R %F IN (*) DO @COMMAND-HERE ARGS-HERE

Directories only:

FOR /R /D %D IN (*) DO @COMMAND-HERE ARGS-HERE

What are the equivalent commands on PowerShell?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>