![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | powershell newbie help Hi all, I am relatively new to powershell, so please bear with me here. I would like to write a simple PS script that searches within a given folder, finds a text file (.txt) that was most recently modified and then copies it to another network folder location. Is this possible? Can someone point me in the right direction? TIA! |
My System Specs![]() |
| | #2 (permalink) |
| | Re: powershell newbie help Hi, try this: Copy-Item (dir -r -filter *.txt | sort LastWriteTime)[-1].PSPath SOMEWHERE Best wishes Tao Ma <paramr@xxxxxx> дÈëÏûÏ¢ÐÂÎÅ:OjTGJ2AKJHA.468@xxxxxx Quote: > Hi all, > > I am relatively new to powershell, so please bear with me here. I would > like to write a simple PS script that searches within a given folder, > finds a text file (.txt) that was most recently modified and then copies > it to another network folder location. Is this possible? Can someone point > me in the right direction? > > TIA! > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Powershell Newbie | PowerShell | |||
| Newbie: WMI and Powershell | PowerShell | |||
| Newbie to Powershell | PowerShell | |||
| Newbie to PowerShell | PowerShell | |||
| newbie - How to use FTP in powershell | PowerShell | |||