itsnexgen 0 Newbie Poster

Hi Friends,

I have been assigned a java based project.

First based on environment variable values for any type of file extension such as .txt, .doc, .pdf etc. Example: FILE_EXT = .txt

If FILE_EXT .txt
then all .txt files in folders sub folders with should run a specific commands (such as command 1, command 2 & command 3.) related to .txt. Similarly for .doc (only specific to .doc), .pdf(only specific to .doc) etc.

If FILE_EXT = .html
then all .html files in folders sub folders with should skip above and run directly command 3.

In all cases these files will be passed and returned from commands again.

My question would be - how to pass environment variable as arguments and also, parsing for specific extension and running particular command.

If any of you could help me with some ideas with snippets would be really helpful!

Thanks,
Paul

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.