Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 13th, 2005, 3:54 AM   #1
skguha
Newbie
 
Join Date: Oct 2005
Posts: 1
Rep Power: 0 skguha is on a distinguished road
Batch file - automate process

Hi,

I need to do the following and would be grateful if anyone can point me in the right way...

i need to call a progam and supply the source file to it.....

for e.g LogConverter.exe C:\Retrieved Logs\123.dat

i need a script to do it.....but the problem is that the name of the file is time dependant and every filename is unique......also the program won't accept wildcards ....so I can't use the following: LogConverter.exe C:\Retrieved Logs\*.dat

is there any way i can pass the names of all the files in the directory one by one to the log converter program......

Any help will be really appreciated.....

Thanks
skguha is offline   Reply With Quote
Old Oct 13th, 2005, 4:46 AM   #2
ivan
Professional Programmer
 
ivan's Avatar
 
Join Date: Sep 2005
Location: serbia & montenegro
Posts: 484
Rep Power: 4 ivan is on a distinguished road
Try with a for loop and a variable for the file name if every file name is a number.
ivan is offline   Reply With Quote
Old Oct 13th, 2005, 10:59 AM   #3
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
The easiest way to go about this IMO is to write a C# console program which allows you to choose a directory and create and object for each file in that directory. Then you can pass the object name to a function and create a new thread for the LogConverter.
OpenLoop is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC