|
Answer» Code: [Select]dir c:\data -r | ? {!($_.psiscontainer) -AND $_.lastwritetime -gt (get-date).date} |
% {Copy-Item -path $_.fullname -destination \\hyperv1\shared\backup} Hello,
I have the above script which is supposed to transfer files I have been working on over, say, the last 24 hours from a Win 7 PC to a Win XP PC with which it is networked in a Homegroup - both are wireless and use the same router. This will SAVE me from having to copy and paste each and every file I use in Win 7 in a day to my XP PC.
If I wanted to transfer, say, a Visual Studio project, WebSite2, which is here:
C:\Users\Steve\Documents\Visual Studio 2013\WebSites\WebSite2 to a shared folder on my XP PC, how would I customise the script above to copy and paste the RELEVANT files from Win 7 to Win XP, and would I type in that script daily in Command Prompt to perform the task?
Thanks.
High1Somebody else will help with your script.
I stopped using batch files a long time ago. There are some many utilities out there already do almost anything you can think of. Almost. I keep my PROJECTS in their own folders or partitions. If I need update my other PC, I use a tool called Sync Toy. It is free from Microsoft and needs .NET framework. First time you use it requires a little work. After that, it does areal quick job of updated either one-way or two-way from and to both PCs. It only does what is needed. Errors do not FREEZE it.
Thanks for that, Geek.
I'll take a look at the link you kindly posted.
High1Oh Oh, I forgot the link. Here it is: http://www.microsoft.com/en-us/download/details.aspx?id=15155Thanks, Geek
I have downloaded it now and will explore!
Regards
High1Quote from: Geek-9pm on September 12, 2014, 05:01:46 PM Somebody else will help with your script.
I stopped using batch files a long time ago
Umm. Do you not RECOGNIZE that as PowerShell code? Yes, I bought a book on Power Shell. Maybe I will read it when there is something that I can not do with stuff that is already in a figurative box.
|