TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft Windows Powershell

Notices

Reply
 
Thread Tools Display Modes
Old 26-06-2008, 04:20 PM   #11
dm3281
Guest
 
Posts: n/a
Re: Getting Day of Week

Thanks everyone for your response.

This seems the most compact and straight-forward in my mind.

Thanks for everyones' help!


"Kiron" <Kiron@HighPlainsDrifter.com> wrote in message news:722D567E-339A-44A8-BB9A-E745010780D9@microsoft.com...
# -< script.ps1 >-
switch ((date).dayOfWeek.value__) {
1 {$pat = 'TUE|WED|THU'; break}
2 {$pat = 'WED|THU|FRI'; break}
3 {$pat = 'THU|FRI|MON'; break}
4 {$pat = 'FRI|MON|TUE'; break}
5 {$pat = 'MON|TUE|WED'; break}
default {exit}
}
ls \\10.246.16.86\D$\XMLBACKUPS\G???BC -r -fo -ea 0 |
? {$_.psIsContainer -and $_ -match $pat} |
ri -r -fo -ea 0 -vb
# -< script.ps1 >-

--
Kiron
  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 02:59 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional