troubleshooting Question

cmd script to run in loop

Avatar of dagga007
dagga007 asked on
Web Languages and StandardsWindows Server 2003
14 Comments1 Solution9799 ViewsLast Modified:
The problem i have is if our application places 2 or 3 text files in a folder
when the batch script runs it renames all three text files with the same name envio.SND.
Windows will not alow 2 or 3 files with the same name in one folder. This is were i have a problem

Any help on this is appreciated

d:
cd mqsysmon\irr\work\ifcsum
copy *.txt d:\mqsysmon\irr\work\ifcsum\backup /Y

rem *********File send  II ***********
:DEBUTII

Del envoi.SND    

ren *.TXT envoi.SND   ""I need the script to look at the first file rename it and then loop back and look at the first file again as the first file is delete once used.""

IF EXIST envoi.SND goto SUITEII

goto FIN

:SUITEII
d:\mqsysmon\mqgen d:\mqsysmon\irr\work\ifcsum\envoi.SND   127949   1026  E  CSQ1   IRL
goto DEBUTII


rem ********* Fin ***********
:FIN
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 14 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros