Jump to content

Batch Scripts in XP Always Infinite Loop??


rickrolled
 Share

Recommended Posts

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 00

If 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy