This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 6851. |
Solve : clock speed? |
|
Answer» Hello All, |
|
| 6852. |
Solve : How to determine what parameter passed to a batch and do something base on it.? |
|
Answer» Hello All, erobby, lookingforhelp, it is CLEAR you do not yet understand about batch parameters. You cannot "test them interactively from the command line". %1, %2, %3, etc are special variables that a batch file can use while it is running. They can't be set by the user as you tried to do. Consider the following batch file which we will call param.bat. Code: [Select]@echo off echo parameter 1=%1 if "%1"=="cat" echo a %1 says Meow! if "%1"=="dog" echo a %1 says Grrrrr! if "%1"=="" echo no parameter passed Save it into a folder as param.bat Now open up a command window in that folder. at the prompt type : Code: [Select]param cat then type Code: [Select]param dog then type Code: [Select]param Now do you see? Dias, Thanks I had already figured that out with erobby response. Anyway. In case you didn't realized it, the tone of your reply was rude and disrespectful. While we would appreciate you responding to our post, I don't believe you're obligated to answer anyone post if you don't feel like it. I believe many people here are asking questions because they don't know or not sure how it should work. Next time you decide to response to a post keep this in mind, try to show some respect to your fellow forum members. I am sure what you know can be learned by anyone. The fact that we don't know/understand it yet, doesn't mean we are idiot. quote author=Dias DE verano link=topic=62085.msg394315#msg394315 date=1216883718] Quote from: LookingForHelp on July 23, 2008, 08:22:07 PM erobby, lookingforhelp, it is clear you do not yet understand about batch parameters. You cannot "test them interactively from the command line". %1, %2, %3, etc are special variables that a batch file can use while it is running. They can't be set by the user as you tried to do. Consider the following batch file which we will call param.bat. Code: [Select]@echo off echo parameter 1=%1 if "%1"=="cat" echo a %1 says Meow! if "%1"=="dog" echo a %1 says Grrrrr! if "%1"=="" echo no parameter passed Save it into a folder as param.bat Now open up a command window in that folder. at the prompt type : Code: [Select]param cat then type Code: [Select]param dog then type Code: [Select]param Now do you see? [/quote]Lookingforhelp, you are the rude and disrespectful one! I think you should modify your attitude. My post was clear and helpful. Having read your post, I think your English is maybe not good enough to understand that I was not being rude. |
|
| 6853. |
Solve : Assigning IP in DOS mode? |
|
Answer» http:// Hey guys, I WANT to ASSIGN IP Address in DOS mode MAY be it any windows OS. Please help if U know a BIT too... |
|
| 6854. |
Solve : dos serial/USB redirect? |
|
Answer» HELLO All: I am USING an old TURBO Pascal code program that requires a touch-window for input. The program has been updated and the newer version runs on our Windows XP machines (in the DOS simulator), but the serial touchwindows (that it was written to work with) won't work on the XP machines. We bought a newer USB touch-window which works wonderfully on the XP computer, but haven't gotten it to work with the older program. I've been looking for a redirect that would allow the program to work with the USB touch-window but so far haven't found anything that works. Does anyone know of any redirects that will work for this application? Or do you know of any companies that would be able to write a custom program for this application? Thanks, Carrie no sorry DOS doesnt work with USB only with serial but i think Ghostdog(one of the mems here) could help you make a VBS script to do this.Quote from: macdad- on July 21, 2008, 04:32:10 PM . . . i think Ghostdog(one of the mems here) could help you make a VBS script to do this. Ghostdog, If this is true, and you are interested in the job, please let me know. Thanks |
|
| 6855. |
Solve : PING Command Doesn't Work?? |
|
Answer» I have this PING batch file. C:\>ping 168.94.171.219. 2. tracert from my computer (Bristol, England, UK). Gets to ge-3-1.hsa2.Minneapolis1.Level3.net and that's all. Quote C:\>tracert 168.94.171.219 3. www.who.is says: Quote OrgName: Best Buy Co., Inc.Most companies block ICMP packet to prevent PEOPLE from discovering devices on thier network |
|
| 6856. |
Solve : batch file output to text file? |
|
Answer» I have been searching for 30 minutes and I can't believe I haven't found an answer YET. MAYBE I have and just don't know it. How do I OUTPUT the entire contents of a batch file to a text file? Is the only way to use the ">" command at the end of each command? Thanksa batch file is a text file, therefore its contents are already in a text file. i dunno what you want to do but i think i understand it I don't think you do. Quote from: mern1 I want to redirect the entire output of a batch file to a text file. Quote from: mern1 I want the code to be internal to the batch file. |
|
| 6857. |
Solve : dir command - the system cannot find the path specified???? |
|
Answer» for win xp-pro, on a work pc, not sure all the configuration that has been set by big company, eds |
|
| 6858. |
Solve : Batch file to copy dynamically made files? |
|
Answer» Hi. I have folder which are made dynamically and i wanted to copy the contents in them to another destination. The folder themselves only have one .txt file in them so that will be easy. However, to get into the right folder is what has me confused. The folders are named like.... |
|
| 6859. |
Solve : system cannot find specified file? |
|
Answer» Quote Anyway, we all got royally led up the garden path Should have stopped to smell the roses. Quote You should uncheck "hide extensions for known file types" in Windows Explorer folder options to AVOID any more "problems" like this one. Or have run a dir LIST on the directory and seen what the actual file names were instead of using a qualifier that did not exist. Sometimes the SIMPLEST things....Quote from: Sidewinder on July 24, 2008, 11:29:01 AM Sometimes the simplest things.... Indeed. Wow I was expecting to see something like this in the post set ydate=%date:~-4% set MDATE=%date:~4,2% set ddate=%date:~7,2% ren hope.txt %mdate%%ydate%.txt |
|
| 6860. |
Solve : How do I Run a batch file before shutdown? |
|
Answer» Hi, |
|
| 6861. |
Solve : That Darned Lexmark Printer? |
|
Answer» :-/ O.K....Here we go again. I finally got the printer installed (ir so it said), but when I check my programs...it's not there. If I try to print a document or TEST page it says there is no printer installed. I am getting extremely frustrated with this...I know people are saying I should just buy a new printer, but I cannot AFFORD it right now. Why WOULD the installation process say it installed successfully & I can't print. I have the printer set as my default & everything. It just does not show up in the programs installed.Sounds like a mess of problems. Since you're running XP, doing a system restore to just before you tried to install the printer would be a good idea. |
|
| 6862. |
Solve : Special Char? |
|
Answer» how can i set all char ([emailprotected]#$%^&*()_+}{"|:<>?/.,\';][=-) to a each other variable and then echo them?? ok but how to: It does work but you omitted to escape the echo line i.e. echo ^%m% no it doesnt, i have vista and this may be a problem Code: [Select]C:\Users\Vaio>set a=^& C:\Users\Vaio>set m=%m%^%a% C:\Users\Vaio>echo ^%m% %m% C:\Users\Vaio>echo %m% %m% C:\Users\Vaio>echo %a% ECHO is on. C:\Users\Vaio>echo ^%a% & and i would repeat this commandCode: [Select]set m=%m%^%a%100 times, so %m% must look like hudert of '&' (just example) |
|
| 6863. |
Solve : found another way to append? |
|
Answer» im using xp pro, try this i didnt know you could do this TILL a minute ago while i was messing around 2^> FILENAME FIRSTLINEOFTEXT then TYPE type filename and you can clear the file, by typing 1^> FILENAME Meaninglesstext it is ALSO possible to call on a batch file like this.. by default if you type i^> it shouldnt do anything so if you made a .CMD file called id.cmd , that echoed %1 %2 %3 %4 you could instead type i^> 1 2 3 4 if you switch the folder you have id.cmd innow that kewl diablo |
|
| 6864. |
Solve : timestamp delta? |
|
Answer» Hello |
|
| 6865. |
Solve : How to add a empty line in a text file?? |
|
Answer» Hi Friends, |
|
| 6866. |
Solve : ANSI Sequences? |
|
Answer» Hey, |
|
| 6867. |
Solve : change directory command? |
|
Answer» i am in ms DOS and it appears A: |
|
| 6868. |
Solve : Ms-Dos boot partition to set up windows? |
|
Answer» how do i CREATE an Ms-Dos BOOT PARTITION to SET WINDOWS while in Ms-dos |
|
| 6869. |
Solve : Re: cd into a Directory with spaces? |
|
Answer» Can you please explain what operating system.......you have.try again and ..............repost........arguement of command problem.s.Hi exchaoordo, |
|
| 6870. |
Solve : Opening Access 2000, using a .bat? |
|
Answer» I want to open an access database using a batch file (simple ENOUGH) but the security WARNING is stopping the Db from opening fully. Does anyone now how to bypass the warning without lowering the security level?That's why it is there. If you disable it from a command line for a single instance it sort of defeats the PURPOSE of taking the time to put it there in the first place.Anyone got any usefull idea'sWonder if I should take offense at that? :-/ |
|
| 6871. |
Solve : MS-DOS Boot disk problem? |
|
Answer» hey hey, |
|
| 6872. |
Solve : Expanding and looping over paths? |
|
Answer» Hi. I'd like to make a batch file that loops over a semicolon separated path variable and displays each directory on a different line. I am having 2 problems trying to do this: |
|
| 6873. |
Solve : Delete files older than? |
|
Answer» Need a simple DOS BATCH program which deletes files older than a certain date.You can do this indirectly with XCOPY using the /d:mm-dd-yy switch. Use XCOPY to copy all the files you want to keep to a temp directory. Delete all the files in the original directory, then move the copied files back. Finally delete the temp directory. Use XCOPY /? at the command line for details on the /d switch. I really wanted code like the following. [SIGH] wouldn't we all! Not as messy but still effective: Dim FSO, f, f1, fc Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) ' <== Change folderspec to your requirements (put in quotes) Set fc = f.Files For Each f1 in fc If DateDiff("d", f1.DateLastModified, Now) > 7 Then fso.DeleteFile(f1) End If Next Set fso = Nothing WScript.Quit Note: you can also use the DateCreated or DateLastAccessed properties Save as a VBS file, then DOUBLE click file to run. Good Luck. Thank you both for your help. I will give it a go. Normhello, maybe this can help u : for /F "tokens=1,2,3,4,5* delims=/ " %a in ('dir') do if "%c%b%a" LSS "20050420" echo %f |
|
| 6874. |
Solve : How to combine two text file using Dos?? |
|
Answer» HI Friends, I need to combine two text file to one file. For EXAMPLE: a.txt file contains Old is gold All the best b.txt file contain World war Happy bday I need the output in c.txt. That o/p file should contain Old is gold All the best World war Happy bday Note: When I tried with the command COPY a.txt+b.txt c.txt which gives o/p as Old is gold All the bestWorld war Happy bday Actually I need the "World war" should ADD in new line... Is it possible in DOS. If so will you please help me to resolve this issue..., Thanks In Advance. Thanks, Vinoth R Type A.txt > C.txt & echo. >> C.txt & type B.txt >> C.txt |
|
| 6875. |
Solve : Prompt for variables? |
|
Answer» Hi, Can someone tell me if there is a WAY I can prompt for a VARIABLE to be input by the user while RUNNING the BATCH script? Doesn't seem to be anything around - for NT OS, either that or I've just forgotten how! Thanks, Jason. |
|
| 6876. |
Solve : Bach Programming Help? |
|
Answer» Hello, show(Press 1 if you want to do A, 2 if you want to do B) But I can't get how I create/define/make variables and how I get the INPUT value for that variable. Could someone help me, please ? obs: Using Comand Prompt from WinServ2k3 :label0 ::use set /p to get input, example set /p x=Enter your CHOICE: if "%x%"=="1" Goto Label1 if "%x%"=="2" Goto Label2 cls & echo You have made an invalid choice & Goto label0 :label1 :label2 Thanks! Lemme just ask another question: What is the difference between this: Quote cls & echo You have made an invalid choice & Goto label0 ....and this: Quote cls?there isnt one, using & is the same as starting a new line so it LOOKS like cls & echo You have made an invalid choice & Goto label0 but its really cls echo you have made an invalid choice goto label0 Ahh! I tought it was something like that =)! Thanks again! |
|
| 6877. |
Solve : set DOS to choose random, or one by one? |
|
Answer» i need something LIKE this: |
|
| 6878. |
Solve : boot diskette? |
|
Answer» After i inserted the BOot Diskette appeared |
|
| 6879. |
Solve : Wscript/cscript help? |
|
Answer» Hi all! you can read more here http://msdn.microsoft.com/en-us/library/aa922603.aspx How would i implement that into a .vbs file like my example above?Quote How would i implement that into a .vbs file like my example above? You probably wouldn't unless you've gone mobile! Consider which control has focus; then consider how many times you have to HIT the TAB key to give the control in question focus. Once the the control has focus, send the enter key (same as a mouse click in this context). Microsoft might have had a great editor if they'd made notepad scriptable. Instead only the CLUNKY sendkeys method seems to work. You can make menu choices with sendkeys by using alt+underline letter (atl-f for file or alt+e for edit etc) to grab the menu, or use the menu shortcuts to do things like save (ctl-s) or paste (ctl-v), etc. Are you sure the WshShell.AppActivate "wordola.txt" is correct? That does not appear to be the window title for notepad. |
|
| 6880. |
Solve : FILENAME WITH CURRENT DATE? |
|
Answer» hi people. |
|
| 6881. |
Solve : converting hex filenames to decimal in batch file? |
|
Answer» Hello All, Hello All, I'm not aware of any batch command that can do this. You can do this is VBScript HOWEVER: Code: [Select]Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") Set f = fso.GetFolder("c:\temp") 'change directory here Set fc = f.Files For Each FS In fc fname = fso.GetBaseName(fs) fext = fso.GetExtensionName(fs) newName = CLng("&H" & fname) & "." & fext fs.Name = newName Next Save with a VBS extension and run from the command line as cscript scriptname.vbs You may have to change the directory name. Good luck. Thank you Sidewinder. batch can do this directly. set /a TREATS numerical strings beginning 0 as octal (pitfall for the unwary!), and those beginning 0x as hexadecimal. Code: [Select]@echo off setlocal enabledelayedexpansion echo abc > 0000.txt echo def > 1000.txt echo ghi > aaaa.txt echo jkl > 000f.txt echo mno > 00ff.txt echo pqr > 0fff.txt echo stu > ffff.txt echo vwx > aef2.txt for /f %%H in ('dir /on /b *.txt') do ( set hexstring=%%~nH set extension=%%~xH set /a decstring=0x!hexstring! set pad= if !decstring! leq 9999 set pad=0!pad! if !decstring! leq 999 set pad=0!pad! if !decstring! leq 99 set pad=0!pad! if !decstring! leq 9 set pad=0!pad! set decstring=!pad!!decstring! echo !hexstring!!extension! =^> !decstring!!extension! ) Code: [Select]0000.txt => 00000.txt 000f.txt => 00015.txt 00ff.txt => 00255.txt 0fff.txt => 04095.txt 1000.txt => 04096.txt aaaa.txt => 43690.txt aef2.txt => 44786.txt ffff.txt => 65535.txt |
|
| 6882. |
Solve : moving files? |
|
Answer» I want to move TXT files depending on their date created, using a batch FILE. Any suggestions?Hi. |
|
| 6883. |
Solve : Copy/replace batch file? |
|
Answer» Hi all, |
|
| 6884. |
Solve : Batch file help-xcopy command perhaps?? |
|
Answer» First off... ello! Great to have a community like this! |
|
| 6885. |
Solve : Trying to write a batch file? |
|
Answer» I have to write a AUTOMATED batch file that will grab logs (ex05051500.log) that I want to zip up and move to another DIRECTORY. need to be able to grab certain files depending on their file name to be zipped What is the criteria for selecting a file? And finally can you script this instead of using batch? Let US know. it is WinXp, and using Winzip 9.0Ok! here we go: First we need a list of the files to select, I'm gonna assume they are *.log files. for /f %%i "delims=. tokens=1-2" in ('dir /b *.log') do ( Next we need to parse out the first 8 characters of the file name (be sure this doesn't create dups) set /p Fname8 = %%i :~0,8% Then it's time to zip them: wzcline drive:\path\%Fname8%.zip %%i.%%j wzcline is the batch version of WinZip Okay!, shut it down with ) If you read between the lines, it's all it front of you. Good luck. I greatly appreciate your help, I have been so lost the past few weeks trying to figure this out, but once agian i'm stuck with your script. I am getting an error. This is how I wrote it in the batch file: For /F "tokens=1-2 delims=." %%i in ('E:\logs\test /b *.log') do "set /p Fname8 = %%i :~0,8% wzcline E:\logs\test %Fname8%.zip %%i.%%j" any ideas? I get this error: The filename, directory name, or volume label syntax is incorrect.For /F "tokens=1-2 delims=." %%i in ('dir /b E:\logs\test\*.log') do ( set /p Fname8 = %%i :~0,8% wzcline E:\logs\test\%Fname8%.zip %%i.%%j ) I'm a LITTLE unsure about the set statement; it may need an addtional % after the equals sign. You can play around with it. I can't emphasize enough to consider script for these types of tasks. The above code is nearly unreadable and it certainly won't get any clearer in six months time. In case you don't have the batch version of WinZip (wzcline), here is the link: http://www.winzip.com/wzcline.htm Hope this helps. thanks for your help- |
|
| 6886. |
Solve : New person in this site and am student in programming? |
|
Answer» Dear EVERYONE, Please, I like to know more about the programming because am flesh STUDENT in Progrmming language which just started in few days ago. I wanna know more Java 6, C++ Fundamentals,Microsoft .NET FRAMEWORK 2.0, UML, FileMaker 9 & PHP Foundations, Programming With Ruby, C Programming 2007, Design Patterns, JavaScript, Thank youQuote from: boaeben on JULY 25, 2008, 08:18:53 AM am flesh student Yummy boaeben, you should be asking your teachers and reading books. Feel free to ask in the programming section if you have specific questions. Google is a very nice teacher as well. |
|
| 6887. |
Solve : DOS and the Recycle Bin? |
|
Answer» Patio.........help!! Graham - thanks for the reply. the three files were likely MSDOS.SYS, MSDOS.--- and MSDOS.SYD. As far as I am aware, only MSDOS.SYS is required to boot the computer into windows... if you have any of the three files remaining, you can copy them back into a new MSDOS.SYS (or MSDOS.---, or whatever file you deleted by accident). I don't know your skill level in DOS, but the copy command will suffice quite well: Code: [Select]COPY C:\MSDOS.SYS C:\MSDOS.--- of course, replace the first filename with one of the MSDOS.* files you haven't deleted, and the second name with the one you have deleted. If you've deleted all three- you can easily create a new one. in Windows 95 and up, MSDOS.SYS (and the backup copies MSDOS.--- and MSDOS.SYD) are simply text files used by the boot loader. I'll just transcribe the contents of the MSDOS.SYS file on my old laptop (circa 1996) assuming of course- it still boots. hasn't been used in the better part of a year. I've been meaning to clean it up anyway, so it's not out of the way at all alright- I've got the contents of the MSDOS.SYS file, you should be able to save this into a new MSDOS.SYS file (using the EDIT program on the target computer). If you're booting windows from a drive or folder other then C:\WINDOWS, you'll need to change the respective options. Code: [Select][Paths] WinDir=C:\WINDOWS WinBootDir=C:\WINDOWS HostWinBootDrv=C [Options] BootMulti=0 BootGUI=1 ; ;The following lines are required for compatibility with other programs. ;Do not remove them (MSDOS.SYS needs to be >1024 bytes). ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxe ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxg ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxh ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxj ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxk ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxl ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxm ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxn ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxo ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxp ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxq ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxs DoubleBuffer=1 AutoScan=1 WinVer=4.10.2222 that should get you booting into the GUI again. Now that I think about it, you could have simply copied MSDOS.SYS from one of the other computers you've looked at to your ailing one. With all this in mind- can you start windows from the prompt it presents you by typing WIN ?Thanks Graham, I put the msdos file that you wrote out for me (thanks) onto a floppy (naming it "msdos.---") and then copied it into the ailing machine's c: drive. Then rebooted, but it still goes to the C:> prompt. Still woking with the floppy, I then change the name of that "msdos.--- " file to just "msdos.sys" and tried copy it over to the c: drive and was asked if I wanted to overwrite "msdos.sys"? I said yes, then was given : "access denied - c:msdos.sys" 0 file(s) copied Question: Shouldn't it have asked me if I wanted to overwrite "msdos.---" ?? I get the feeling that the .--- file extension is a wildcard of some sort? Using "Dir" command shows that the "msdos.---" file is there. Not msdos.sys or ANY other msdos files.... yet I know for a fact that there was an "msdos.sys" and a 3rd "msdos. " file in the root before this "event" occurred. Hidden files in play here? I next took a known good version of this msdos.sys file from another machine, as you suggested and copying it to the ailing machine's root... but my machine won't add another msdos file, it only wants to overwrite the existing, with the above referenced results. What is the syntax for deleting that msdos.--- file from the root directory? Thanks againIs there a full ver. (probably 6.2) installed on this machine ? ? If so put floppy #1 of MSDOS in and at the A; prompt type in sys C:\ and hit Enter...Quote from: AndyCountry on July 29, 2008, 02:27:30 PM Thanks Graham, That was my post... you can blame him if it doesn't work, though. Quote from: AndyCountry on July 29, 2008, 02:27:30 PM Thanks Graham,It wouldn't of asked you to overwrite MSDOS.---, since the file obviously didn't exist. No it is not a wildcard char, only ? and * are wildcard characters. MSDOS.--- is likely a system-created backup of MSDOS.SYS, MSDOS.SYD (my guess as to the third filename extension) is created GOD knows when, and isn't used to begin with... MSDOS.SYS is hidden, and will only show up with a dir switch: Code: [Select]dir C:\ /ah anyway- MSDOS.SYS is always hidden on drive C:, which makes me wonder how you deleted it in the first place. I don't see how that caused a problem. instead, you might have an easier time editing your existing MSDOS.SYS file, to check for the existence of the BOOTGUI option. booting from the C:\ drive into the command line and running EDIT MSDOS.SYS should enable you to view the current settings. If BOOTGUI=0, change it to 1, and your problem should be solved. Otherwise, we'll try replacing it with a known-good version (the one I provided, assuming your Windows dir is C:\WINDOWS). first, you'll need to make the MSDOS.SYS file on C:\ non hidden. It's also set to System, so we'll need to do it in one fell swoop, otherwise the attrib command will whine: Code: [Select]attrib C:\msdos.sys -s -h (I'm a bit rusty, but if it says "not resetting ...." just flip around the -s and -h in that command.) now that MSDOS.SYS is visible, you can rename it (say, MSDOS.OLD) and copy over the MSDOS.SYS file from the floppy. With any luck, that will work. Somehow your MSDOS.SYS file that is currently on your HD possesses the "BOOTGUI" option set to 0, or at least that is my guess. EDIT: patio's suggestion might help, if we forget that the machine is actually running windows 98SE which uses MSDOS.SYS for configuration data, as opposed to MS-DOS 6/6.2's MSDOS.SYS file that contains machine code. BC........many apologies for not noting you were the person responding to me. What is the emoticon for "very embarrassed"?? I thank you for your time and patience. I used your "attrib ......" command to allow me to see the hidden sys files when in DOS. However, I have forgotten most, if not all, DOS COMMANDS over the last 25 years (IBM AT) since I had to regularly use them, and when I went to rename the msdos.sys files, I was left scratching my head. I did eventually manage to rename both msdos files. I copied "your" msdos.sys code over to the root of the ailing machine and all is well now. An interesting aside.....your msdos file is over 1,600 bytes yet the one native to my machine contains only 9 bytes (";WIN98EBD")... both work, which is all that counts I guess. Strange. Thanks again BC_Programmer. You had wondered how I deleted this file in the first place? I always enable the OS to show hidden and sys files. Perhaps I should abandon that practice Quote from: AndyCountry on July 29, 2008, 05:09:13 PM the one you copied over was the MSDOS.SYS from your Emergency Boot Disk, thus the ";Win98EBD". Normally there is that buffer of x's so older programs won't get confused when they see a MSDOS.SYS that is smaller then 1024k, or something, not sure about the details... |
|
| 6888. |
Solve : cool website? |
|
Answer» heres a cool website, i think it can ANSWER a LOT of questions asked on this forum, are there any other good website if you are intrested in this subject? |
|
| 6889. |
Solve : EMS-Memory on newer Boards for DOS? |
|
Answer» Hello to All! |
|
| 6890. |
Solve : log+send?? |
|
Answer» im trying to do two THINGS, |
|
| 6891. |
Solve : batch program help? |
|
Answer» OS: win 2k OS: win 2k mean to say not prompted Change the LAST line to "copy zzz.exe testfiles" or "copy zzz.exe testfiles\zzz.exe" (minus the quotes). |
|
| 6892. |
Solve : Batch Files, Logic, and Time? |
|
Answer» Forgive me. I'm new to these forums, and to the Batch file deal... Grew up with computers, and if I knew about batch files back when I was a budding geek at the age of 14, I'd know what I was doing now...Only I didn't...So... |
|
| 6893. |
Solve : Help with Batch file and Output? |
|
Answer» I am trying to write a batch file that will read 100's if IP's from a txt file, ping each one, then output the results to a file. Each successive ping request/results should be appended to the same txt file. Also you can use a find to limit the list like find /i "Reply" to find only machines that are replying to your ping request or a find /i "Pinging" so show every pinged address and whether it resolves or not Where would I use this switch in the command/bat file?Quote from: flainstigator on July 25, 2008, 07:07:31 AM Now I am waiting on the results of the complete run, and will post when complete. Thanks for all the help!! The basic file runs complete now. Now to tinker and SEE what ELSE I can do to streamline the outputs.Quote from: flainstigator on July 25, 2008, 07:22:26 AM Quote from: erobby on July 24, 2008, 06:34:18 PMAlso you can use a find to limit the list like find /i "Reply" to find only machines that are replying to your ping request or a find /i "Pinging" so show every pinged address and whether it resolves or not @echo off if exist pings.txt del pings.txt for /f %%I in (ips.txt) do ( ping -n 1 %%I | find /i "Reply" >> pings.txt ) THANKS - You all ROCK. Saved me tons of time and angst!!! Quote from: Dias de verano on July 25, 2008, 07:39:25 AM Quote from: flainstigator on July 25, 2008, 07:22:26 AMQuote from: erobby on July 24, 2008, 06:34:18 PMAlso you can use a find to limit the list like find /i "Reply" to find only machines that are replying to your ping request or a find /i "Pinging" so show every pinged address and whether it resolves or not for /f %%b in ('ping -n 2 -a %*^| find /i "Pinging"') do echo %%b >> pings.txt Same thing just one line |
|
| 6894. |
Solve : moving files using batch? |
|
Answer» how to move files by their CREATED DATE USING BATCH commands?XCOPY |
|
| 6895. |
Solve : Inherit Permissions? |
|
Answer» Does ANYONE know if you can set/unset the "ALLOW inheritable permissions from parent to propagate to this OBJECT" OPTION on the SECURITY settings for a folder in MS-DOS? |
|
| 6896. |
Solve : No output file? |
|
Answer» The following command does a DSquery to get a LIST of computer NAMES from AD which are then filtered using the find /V and after the filter the remaining host are pinged and "Reply From" is searched for. If "Reply From" is found then Errorlevel is 0 indicating successful completion of the command. I can run the command but the files aren't being output. Everything else works correctly the second command works properly and outputs the files but the first one does not output files. |
|
| 6897. |
Solve : starting a script via a batch file? |
|
Answer» hi all, |
|
| 6898. |
Solve : DOS?? |
|
Answer» ;DHi! My NAME is Valerie Boise, I'm 16 years old and I'm working on a project for class. All of this computer stuff is new to me, I seriously thought I knew a lot when I figured out how to change font colors and SIZES using HTML, lol. Well, apparently I didn't know much. Now my teacher is bringing me to a project where I need to make a DOS bootable disk, that's done. Now he wants me to figure out how to make it so when the disk is in place and you turn on the computer, an educational game will pop up. I read this site a couple of times and maybe I'm just blind or don't understand but I can not figure out how to do this. I do not know how many times I will beable to visit the site so if you have an idea on how to do this, my e-mail is [emailprotected] and I check my mail everyday so I probobly will recieve it. Making the subject "Info about DOS" or something like that would be helpful so I do not accidently delete it. Thanks for your time and consideration. ;DHi! My name is Valerie Boise, I'm 16 years old and I'm working on a project for class. All of this computer stuff is new to me, I seriously thought I knew a lot when I figured out how to change font colors and sizes using HTML, lol. Well, apparently I didn't know much. Now my teacher is bringing me to a project where I need to make a DOS bootable disk, that's done. Now he wants me to figure out how to make it so when the disk is in place and you turn on the computer, an educational game will pop up. I read this site a couple of times and maybe I'm just blind or don't understand but I can not figure out how to do this. I do not know how many times I will beable to visit the site so if you have an idea on how to do this, my e-mail is [emailprotected] and I check my mail everyday so I probobly will recieve it. Making the subject "Info about DOS" or something like that would be helpful so I do not accidently delete it. Thanks for your time and consideration. Hi my computer says that the system is running ms dos and microsft windows and i dont know what i did can any one please please help me... thank you nancy What are you wanting it to SAY? What operating system do you think you are running? Valerie: You need to create a batch file that will start the program & save it to the boot diskette. Then you need to edit the AUTO.EXE file on the diskette to start the batch file. These links will help you do your home work: HTTP://www.google.com/search?hl=en&q=%22batch+file+to+start+a+program%22&btnG=Google+Search Regards, Doc |
|
| 6899. |
Solve : One line executes - then stops? |
|
Answer» I have a bat file, when I run...only the first line gets executed and then the bat stops. Something that seems so easy, I'm pulling my hair out and found this web site. Advice appreciated. Christinaand what is on this line?..\makeit 21-00-00-00-a-001-a-a.xml ..\xsl\dmodule.xsl temp.html -v |
|
| 6900. |
Solve : Using DOS Today...? |
Answer» QUOTE from: BC_Programmer on July 29, 2008, 11:18:43 AMAnd I hate to drag this thread on any longer, but this confused me, "so While DOS was not a disk Operating System it was still called DOS because it FUNCTIONED the same Way". I'm not particularly sure what you mean there- all DOS needs to do to live up to the acronym is work with floppy disks (or hard disks, as the case may be). I don't see how the presence or lack of a setup.exe file can disqualify it from the term.... BC_programmer, let the guy have the last word, even if he's wrong. It seems that his personality needs it. Quote from: Dias de verano on July 29, 2008, 11:29:33 AM Quote from: BC_Programmer on July 29, 2008, 11:18:43 AMAnd I hate to drag this thread on any longer, but this confused me, "so While DOS was not a disk Operating System it was still called DOS because it functioned the same Way". I'm not particularly sure what you mean there- all DOS needs to do to live up to the acronym is work with floppy disks (or hard disks, as the case may be). I don't see how the presence or lack of a setup.exe file can disqualify it from the term.... OK. whatever he says next will go unrefuted. You left this thread not because you couldn't argue with the logic presented, but because there wasn't any logic presented, I wish I noticed that as early as you did .... I have met that type of person plenty of times on forums. They cannot BEAR to be contradicted, to such an extent that they will reply with nonsense in order to "win" (as they see it) the argument. My father is one of the people. I know the type well. When you fall silent in stunned amazement at how crazy they are being, they see this as a sign that they have defeated you. It's like the ones that post a problem with the computer and claim that the power supply must be at fault, regardless of how many times they are told that being unable to right-click .DOC files is not a power-related problem. Then when they replace the power supply and the problem continues, they ask what's wrong with the power supply, without even thinking that maybe the power supply wasn't the problem to begin with.Computers are a bit like cars, in a certain way. That is, there is a certain kind of person, usually male, who reckons he "knows about" them. Often this knowledge does not extend very far at all, and their desperate need to appear all-knowing prevents them from actually ever learning anything from other people.All I was saying is that if you make a statement that DOS does not exist in win2k and later then you have to accept the fact that DOS isn't DOS, because by your standard Microsoft still call it's command.com a DOS interperter. You can't have it both ways and say there is no DOS in Win2K and later OS's although Microsoft clearly say's it is. In the event you were unaware of this just type command and press enter. And if this is the last word thank you for you time DIAS and BC. I can assure you I have nothing left to add to this pointless discussion about what is and what isn't DOS. But I do APOLOGIZE Sincerely that my points were either misunderstood or not understood, and yes there is a difference. C:\>command Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\>cmd Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\> |
|