rickrolled Posted February 10, 2011 Report Share Posted February 10, 2011 I have a handful of very basic batch scripts (for example, one defrags a hard drive and in a folder called BATCH. I put the folder in system32 and added it to the path. When I double click on the script it opens a cmd.exe window but then just continually prints the path that I was in and the name of the script. So it just continually prints something like this:C:\system32\BATCH>defrag c:I am pretty sure it does this with all of my scripts.However, I could be wrong about that, so I'll post what my defrag and shutdown script is:defrag c:shutdown -s -t 00If I just open a cmd.exe window and type in defrag c: it works. I tested just the defrag c: part in a script on another Windows machine and it behaves the same way (I didn't run the script from the path when testing on the other machine though)Thanks. Quote Link to comment Share on other sites More sharing options...
rickrolled Posted February 11, 2011 Author Report Share Posted February 11, 2011 I seem to remember this happening with other scripts, but strangely enough, all I did was change "defrag c:" to "defrag.exe c:" and it started working correctly. Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted February 12, 2011 Report Share Posted February 12, 2011 So the problem is resolved?What is the script's name and extension, b.t.w.? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.