what language

  • Thread starter Thread starter gerryR
  • Start date Start date
G

gerryR

Not sure where to post this as I don't know what language it applies to
(yet)

Basically I work in IT and often have to manipulate folder structures or
large amounts of text files and am looking for the best way of automating
this procedure specifically through a programming language. I did Pascal,
and C++ in college (several years ago now) so I'm sure the basics of coding
will come back to me once I start.

Question
What language would you recommend as the best way of dealing with these
types of issues? I know dos script has the ability to do some of this but
I'd prefer a more polished approach (ie to be able to make an executable
with some sort of basic gui)

eg situation1:
We have a folder structure (100s of folders deep) with a job in the name of
every folder. We want to change the job no in all the folders.
Here we'd give the option so say point to the folder structure, replace what
with what etc

eg situation2:
We need to generate 100s of files txt/ html which are basically the same
code with some a couple of minor changes.
Here we'd say combine this (paste the 1st bit of code), with 1 line from
this (link to a txt file with a list of usernames on each line) and this
(paste the 2nd bit of code) and each file it generates would take the next
line from the txt file and the next one and so on.

Sorry for the long post, I know the egs are specific but in general working
with files and folders would come up alot. Obviously I could migrate to
more ambitious projects once I improved.

thanks for any feedback
gerryR
 
gerryR said:
Not sure where to post this as I don't know what language it applies to
(yet)

Basically I work in IT and often have to manipulate folder structures or
large amounts of text files and am looking for the best way of automating
this procedure specifically through a programming language. I did Pascal,
and C++ in college (several years ago now) so I'm sure the basics of coding
will come back to me once I start.

Your scenarios sound like they could well benefit from using a
combination of scripts and perhaps some custom classes where "plain"
scripting falls short.

I would recommend you learn about PowerShell, the new "object pipeline
oriented" shell from Microsoft, and then any of the .NET languages for
any custom classes required. I personally like C#, but any of them will
do. See http://www.microsoft.com/powershell for more information. Using
a scripting language tends to make working with files and folders
slightly simpler than doing it all in a .NET language.

I would also recommend using Groovy, as that works well for both the
scripting and custom code side of things - but it's Java-based, and I
suspect that as you're posting in a .NET newsgroup you'd prefer
something .NET-based. If you do want to look at Groovy, see
http://groovy.codehaus.org
 
thanks for all the replies. didn't know there was a difference between c#
and c++.

powershell sounds good but I'd prefer to be able to run the finished
program/ script on any machine without having to install something (ie
powershell)

I'll have another look round based on your suggestions. Thanks for your
input
gerryR
 
gerryR said:
thanks for all the replies. didn't know there was a difference between c#
and c++.

powershell sounds good but I'd prefer to be able to run the finished
program/ script on any machine without having to install something (ie
powershell)

In that case you'll have to ignore anything .NET-based - the .NET
framework doesn't exist on all Windows installations.

Admittedly PowerShell requires .NET 2.0, so there is *an* extra
installation required...
 
Back
Top