|
Answer» Hello, all. Obviously this is my first post but I have used the faq's quite a bit before today.
First of all, this work is being done on a rather old system. However, it has been updated to Winxp sp2. I have a question about running dos in this operating system. I have created a batch file witch I would like to get autoexec to run when computer starts up. So I have two questions. First one, I cannot use the edit command in the command prompt. I go to start menu, run, and type cmd to get command prompt. I type edit autoexec.bat to edit the file. I get the ERROR saying 'edit is not recognized as an internal or external command, operable program or batch file.' Why am I getting this? I have tried changing directories and a few other dos commands and they work. I figure this is a winxp only error. My second question is about the batch file I have created to put in autoexec. I want it to delete some files but I can only get it to work if I place the batch file in the same directory as the files I want to delete. For some reason when I give the command, del C:\xxx\xxx\xxx, I get the error saying the file could not be found. Why? I gave it the correct directory. The files exist and they are not HIDDEN files. What does it take to get this to work on winxp?For you second question, try Code: [Select]del "C:\xxx\xxx\xxx"instead, that is, puting quotes around the path
Hope that helps Welcome to the CH forums.
Edit exists in the C:\Windows\System32 folder so the Path Environment Variable must contain this, if it does not then the correct folder\sub-folders will not be searched. Check your path Environment Variable by entering Path at the command prompt.
Hard to diagnose your problem with Del without seeing your command line. Do any of the entries contain blanks? If they do then enclose the command line in double quotes.
Good luck & please post back with your results/comments.
Helper, thanks for the tip on the quotations. That did the trick.
Dusty, thanks for the tip for the path environment variable. Once I added sys32 to the LIST, edit now works.
ALSO, to the both of you thanks for the fast replies!
So now everything works like I want it to when run autoexec.bat. The only problem is, autoexec.bat is not running at startup. I don't understand why. Its location is C:\autoexec.bat. Anyone know why? I have tried running it hidden and not hidden-doesn't matter. I even moved it to the windows folder, still no luck.Windows XP does not really use an autoexec.bat. What you can do is create your batch file, and then put a shortcut to that batch file (or even the batch file itself) in the "Startup Group" which is typically located in "C:\Documents and Settings\All Users\Start Menu\Programs\Startup".ubuntu, GuruGary is right, windows uses "autoexec.nt", also >>this<< says to use, in windows 95, or higher, "sysedit".Thanks GuruGary. I moved my autoexec.bat to that startup location and now everything works like I want it to.
Helper, I had read that same page you pointed out before. I did try the sysedit and it would not work either. It works now that I added the system32 folder to the path. Since I moved my autoexec to the startup folder as Gary mentioned, sysedit fails to load the autoexec file. But that is because I moved it. Sysedit looks for C:\autoexec.bat. I moved it back to that location just to check it out and it does work.
Thanks for the help. Great Forum and excellent faq pages!
|