Computer Hope
Software => Computer programming => Topic started by: yuva_17raj on May 24, 2008, 12:33:47 AM
-
hi i am using tomcat to run my application so that more than one client access my application and when the client logged in to my application each time 4 log files created in the following folder C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs so that my application runs very slow and here i need to clear the particular folder or move the files from the folder to D:/templogs so that i need a batch program to do the specified process kindly reply me with the solution
regards
yuvaraj
-
Have a look at the Move command
It would be something like this:
move "C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\file.log" "D:\Templogs\file.log"
-
yes i got it
thanks and regards
yuvaraj
-
;)
-
hi as i have specified that my application is running under Tomcat as a server in online so here i should not stop the tomcat to move the file but my process has to continue i have used the simple code as follows
move /y "C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\*.*" "D:\test" so here i have the problem that my tomcat will always running but i should move the files without stopping the tomcat how to achive this using batch programs
regards
yuvaraj
-
So if I understand this correctly, you want to back up the logs in D:\test but you can't move them because the program is in use.
Try the copy command:
copy "C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\*.*" "D:\test"