Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
4/24/2013 9:47:26 AM EDT
Any Powershell gurus in the house?
4/24/2013 10:22:36 AM EDT
[#1]
I'm pretty good at powershell.  What are you tring to do and which snap-in are you using?
4/24/2013 10:31:17 AM EDT
[#2]
Quoted:
I'm pretty good at powershell.  What are you tring to do and which snap-in are you using?


I need to write a script that will run through a folder and move files to other folders based on part of the file name.

There is a folder name Logs with a bunch of log files.  Need to evaluate them based on the last part of the file name like "2013-1.log" and move them to corresponding folders named for each month.

So 2013-1 moves to January
2013-2 moves to February etc..
4/24/2013 10:46:56 AM EDT
[#3]
Look at this link and if you still have problems let me know.  Probably easiest if you send me your script (just get rid of your actual paths) I'll have a little bit of time this evening to look into it.

http://stackoverflow.com/questions/13073320/moving-files-into-existing-subfolders-based-on-part-of-the-filename-using-switch
4/25/2013 4:29:55 AM EDT
[#4]
Quoted:
Look at this link and if you still have problems let me know.  Probably easiest if you send me your script (just get rid of your actual paths) I'll have a little bit of time this evening to look into it.

http://stackoverflow.com/questions/13073320/moving-files-into-existing-subfolders-based-on-part-of-the-filename-using-switch


I'll give it a try.  I started to look at it yesterday but got interrupted and never got back to it.  Thanks for the link.
4/29/2013 9:29:30 AM EDT
[#5]
I got a script to work to move the files based on the name.  Now they threw in a monkey wrench and I need to leave the current months files in place.  Any tips on where to start for that?
4/30/2013 4:45:03 AM EDT
[#6]
Quoted:
I got a script to work to move the files based on the name.  Now they threw in a monkey wrench and I need to leave the current months files in place.  Any tips on where to start for that?


LOL, Stupid User Tricks, tell them you need a statement of work before you spend another minute on it.
4/30/2013 4:57:15 AM EDT
[#7]
Quoted:
Quoted:
I got a script to work to move the files based on the name.  Now they threw in a monkey wrench and I need to leave the current months files in place.  Any tips on where to start for that?


LOL, Stupid User Tricks, tell them you need a statement of work before you spend another minute on it.


Wish it was that simple.