InterviewSolution
| 1. |
Solve : How to write a batch file? |
|
Answer» Hello all, I am trying to write a batch file that will read the files in a folder on my computer. The path is O:/CustomerInvoices. Inside this folder there are 1000's of folders and each folder has three columns. What I want to do is find all records in the folder that have a date, which is in the third column, that is LESS than or equal to year 2010. I want to take the files that are in each folder and zip them with winrar and place the zip'ed files in separate folder. How do I do this? Please keep in mind that I know very little about batch files.Maybe vb, perl or powershell would be a better solution for you?definitely not a tak for batch. it might be possible... (doubtfully) but it would take a lot of work. im sure there is a better language for this.What type of files are they?Honestly, I don't have much of an idea. Since the number of records pre-2011 isn't going to change, it may be SIMPLER to just do it manually. All of the files should have a modified date..., so you may be able to use that ASSUMING that it wasn't changed since 2010. But there are a lot of variables that come into play with something like this. What I do know, is that building a script/program to do that could BECOME quite time consuming and complicated, and if it's not going to have significant benefit in the FUTURE, it doesn't sound like the right solution. |
|