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.
| 4101. |
Solve : unable to access and del. known file? |
|
Answer» system configuration utility |
|
| 4102. |
Solve : how to pass filename as parameter in a folder? |
|
Answer» I would like to pass the filename in a specific FOLDER as a parameter to run a process. May I know how to write the script.If you mean the file name of the batchfile, it is %0 in the script. |
|
| 4103. |
Solve : Set DOS prompt to dir name? |
|
Answer» The is a Unix prompt setting whereby the prompt can always show the working directory name - not the full path, that is, just the name. |
|
| 4104. |
Solve : Search String and delete it? |
|
Answer» Hello, |
|
| 4105. |
Solve : Save word docs from bad HD? |
| Answer» DATA recovery SERVICES, or software data recovery, but it will not be FREE. It just depends HOW important those are to you. | |
| 4106. |
Solve : How can I print the fullwidth character?? |
|
Answer» I want to PRINT out some Fullwidth characters with print.exe under WIN2K command PROMPT. |
|
| 4107. |
Solve : parse string from textfile with Batch (Dos 7.10)? |
|
Answer» Hello, |
|
| 4108. |
Solve : Need batch file to use current date.? |
|
Answer» Hi |
|
| 4109. |
Solve : Help me with ms dos 6.22? |
|
Answer» I have a compaq presario 1.1.1.5 with XP Home edition. Starting the computer tell me that can't find anymore C:\windows\system32\hal.dll. and it stops here. |
|
| 4110. |
Solve : Save variable? |
|
Answer» I need to be able to "save" a variable for use LATER in anouther bat file. I am using the date and time as a variable, and once my 1st bat file runs and CLOSES I have other bat's I want to run later using the same date and time but it doesn't "remember" what it used earlier. I am almost positive this is possible I just dont know how to pull it off. Any help or suggestions are appreciated.I'm no DOS hacker, but surely you could export the value to an environment variable, eg SET VARIABLE=value?Do you mean something like this? |
|
| 4111. |
Solve : Why Batch file doesn't work on certain comps? |
|
Answer» There are a lot more of the following if statments... |
|
| 4112. |
Solve : Logon Script Logic? |
|
Answer» Does anybody know the syntax for using a OR in a IF stagment in a login SCRIPT? What i want to do is something like this: |
|
| 4113. |
Solve : dos setup of Win98? |
|
Answer» My old laptop TECO 130 MHz 1gig 24 mg RAm has no cd rom and I need to install OS Win98 on it. I managed to load its HD with installation cabs from CD. I also installed DOS 6.21 and it's GOING well. I don't know how to go about DOS commands to install Windows98. |
|
| 4114. |
Solve : Automatically running a batch file? |
|
Answer» Hi Friends, |
|
| 4115. |
Solve : How to write the > sign to a file? |
|
Answer» Hi, |
|
| 4116. |
Solve : setting max waiting time in starting application? |
|
Answer» Hello, |
|
| 4117. |
Solve : Dos script? |
|
Answer» Each time one of our processes runs it creates a file where the filename includes a unique identifier. The name looks like xxxx_99999.pdf, where the xxxx part stays the same, but the 99999 part varies. We can't know what it will be although they are sequential. We want to create a DOS script to COPY the most recently created file in a folder to ANOTHER location. Any solutions?Whatever methodology the process that creates the files uses, needs to be used in your script to generate that same file name. |
|
| 4118. |
Solve : Launching a .bat on a remote PC? |
|
Answer» I have two computers on my home network. The problem is that I am on a limited INTERNET connection. So when both PCs are on (or being used), they become very laggy in terms of upload/download capacity. |
|
| 4119. |
Solve : getting a file to work? |
|
Answer» I am trying to INSTALL mysql. They say i need to get this file in dos. C:\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld Ok, looking at that, and not know what type of windows you use, i'm seeing errors that WOULD show up on windows xp professional anyways. It might help... with your directory c:\program files There is a space, and dos windows does not like spaces in directories so, what you would type instead would be c:\progra~1\ Reason for this would be that when typing in folder names, DOS windows has an 8 character limit, so including the ~1 there is 8 characters... You have to set this up like that. Also, the reason it is ~1, represents that it is the first folder created with that name. Here is how it works say i have a folder under the C: DRIVE called testingfiles then i have another called testingfilesother this is what i would type into dos windows to get to the directories testing files would be cd c:/testin~1 note: this still obeys the 8 character limit, and assuming it was the first file created, then it will work Testingfilesother would be cd c:/testin~2 |
|
| 4120. |
Solve : Can i close other programs??? |
|
Answer» I often tried to find a program which will close other programs. |
|
| 4121. |
Solve : newbish problem? |
|
Answer» Hi guys, |
|
| 4122. |
Solve : cd rom drivers? |
|
Answer» Please I am at a loss I am trying to fix an OLD 486 up for a friend and I cant load win98 from the cd as the cd doesnt work as I cant load the drivers in dos can any help. Thanks in advance. I havent used dos fo a long time.Use w98 boot disk and boot with cdrom support. You can make a boot disk from a w98 machine or download one from bootdisk.comAnd can you run WIn98 on a 486? That is a bigger question.It should be possible. Depends on which 486 and how much RAM. It should be possible. Depends on which 486 and how much RAM. But we will only be left to guess all of these things as there is NO info given on the mystery 486.Thank you all for the info SORRY I didnt give much information but I dont have it. The problem is I cannot get the device drivers for the cd rom to PICK up I have a boot up disk for win98 and ALSO a cd for win98 it has only got 64mb ram It has an Oshumi motherboard and a pc controller. Thanks anyway64 MB RAM are enough for WIN98. Your Bootdisk has no CD-ROM support? Load one down like 2k_dummy suggested. The most CD-Rom drives should work with "standard" drivers. Not every company write their own drivers. There are also Bootdisks for download: http://www.nu2.nu/bootdisk/ hope this helps uli |
|
| 4123. |
Solve : antivirus stoped in command prompt? |
|
Answer» norton was STOPED in command prompt doughters frind thought it was stoping them from networking turns out the router was off norton was not restarted and this young man isa out of COUNTRY now norton was stoped in command prompt doughters frind thought it was stoping them from networking turns out the router was off norton was not restarted and this young man isa out of country now Quote norton was stoped in command prompt doughters frind thought it was stoping them from networking turns out the router was off norton was not restarted and this young man isa out of country now I am not clear at all on what you are TALKING about. Obviously you do not have the computer so this is all second hand COMING from you. What Norton? Firewall, internet security, antivirus? Is the router on now? Are they stuck in command prompt? I think you will need to rephrase all of this.My doughter wanted some pics from my laptop she tryed to networkour laptops her frind thought norton antivirous was stoping them from doing so he used command prompt to stop my antivirus get error message at startup access to drive c deniedhow do I find at he typed in my command prompt have xp pro- norton antivirus 05Kurt R.......We're trying but is hard to figure out exactly what the issue is ....It sounds like .....your daughter wanted to transfer some pictures from your laptop to hers. You are using winXP Pro and are using Norton Antivirus 2005 . Then you lose me with the comments about someone being out of the country and Norton being blocked by something .......... Please clarify the following ......... If you reboot your laptop ..........is Norton enabled or disabled ? Are you able to connect to the internet thru your router ? Clear up these items and we can continue . dl65 norton is disabled after reboot yes I can conect to internet after reboot get message norton access to c denied router not mine he typed some thing into command prompt to stop norton access what would i type into to restore norton access to c thanks I have also tryed regedt HKEY-LOCAL-MACHINE- SOFTWARE-SYMANTEC Right click secutity and permissions the boxs are grayed out and cant change |
|
| 4124. |
Solve : Querrys? |
|
Answer» Hello, |
|
| 4125. |
Solve : name prefix mindblowing problem? |
|
Answer» I have got an image sequence that I NEED convert to another format. It's very |
|
| 4126. |
Solve : Input parameter for batch file? |
|
Answer» Dear Friends, How do i set input parameter for .exe file from command line of batch file Probably too EARLY in the morning, but not sure want you want to do. You can pass PARAMETERS to the program on the command line: x.exe parm1 parm2 parm3 Obviously the parameters must be in a format the program understands. You can also get parameters from the user at run time: Code: [Select]set /p parm=Enter Program Parameter: x.exe %parm% Note: set /p is not valid on all machines. Hope this helps. 8-) |
|
| 4127. |
Solve : SLEEP Alternative in Windows Batch Files?? |
|
Answer» I'd like to put a 30-second wait in a Windows batch file. It seems that I USED to be able to do this with SLEEP but the option isn't available anymore in W2K/XP. Does anybody have any suggestions that doesn't involve user input? I need to add a delay before I bounce a service.Use "The poor man's timer". |
|
| 4128. |
Solve : downloading and installing ms-dos? |
|
Answer» Hi! To install FreeDOS or any other operating system, you will need to to partition your hard drive and set up a dual boot system, use another computer or use a virtual machine application.Er... Sure the user can just follow this installation procedure, and FDISK the NTFS partition into oblivion? There's nothing on it, after all.I read it first time as an OS was already installed. Having re-read it, I can't SEE how I thought that. Most definitely, if there's nothing already present, then a standalone DOS installation or even a dual boot system shouldn't present a problem. |
|
| 4129. |
Solve : Creating a Batch that when downloaded can Run !!? |
|
Answer» I have created a batch file that moves a file to another folder. |
|
| 4130. |
Solve : How to control usb device using MS-DOS?? |
|
Answer» Hi! All, |
|
| 4131. |
Solve : doing a dir list to a txt file for comparison? |
|
Answer» Here's my dilema, I need create a .BAT file that takes a snapshot of dir. redirects it to a .txt file then copies the diff between files in dir A and WHATS on the list. it NEEDS to be able to loop and APPEND the txt file with the difference and copy only the difference to the new folder. if this makes any SENCE..any help would be much appreciated. |
|
| 4132. |
Solve : Full List of Contents not Shown? |
|
Answer» I find that when I do a list directory command that all of the contents are not show in the window, I can scroll down, but not up. If you are not interested in seeing file details, you can use dir/w/p and many more files to the page will be listed. Who did MS lift that feature from? Was it PC-DOS or DR-DOS? I just can't remember the details. It was quite an addition in it's TIME!Another solution: cd c:\windows\system32 dir |more Or: You may redirect the output of a command to a file: E.g.: cd c:\windwos\system32 dir > outdir.txt After that, you can read the content of the file with notepad, EDIT or some other program. at command prompt you can use: edit outdir.txt You can also do dir | less (Less has more features than more.) :-) :-) happy computing uli |
|
| 4133. |
Solve : Hi-Batch Files? |
|
Answer» Hi- |
|
| 4134. |
Solve : Error with Turning .Bat to .Com? |
|
Answer» I used the BAT2EXE program to turn a .bat I had into a .COM so that my source code would be harder to read. I tested the .bat serveral time and was successful, however, when I turned it into a .com, the results where nothing happening. |
|
| 4135. |
Solve : Output Directory Listing to File? |
|
Answer» Hey all:
What I'd like to do is right-click on "Documents 1" and get a file back called "Documents 1.txt" or "DOCUME~1.txt" or at least a prompt for what to call it. Is that do-able? Thanks! I have a similar problem. I want to manually send multiple dir listings to a single file. I use dir > C:\my-file.doc, and this is OK! But when I do it to the next dir, it OVER-WRITES writes the first file. -- I am looking for a simple command at the end of the command string that would allow me to "append" or add it to the current file. -- I am an old Cobol programmer and it seems to me that years ago, that there was a way to do this in DOS. -- Pat O'Mahony [emailprotected] end of message Use >> to append to a fileThat worked perfectly; FIT the BILL... I'd still like to know if there's a way to automatically name a file after its subdirectory? Thanks |
|
| 4136. |
Solve : Curser Missing from screen Help!? |
|
Answer» Curser has disapeared from screen in all modes. |
|
| 4137. |
Solve : shutdown.exe? |
|
Answer» I tried to use the shutdown.exe command on a remote PC. |
|
| 4138. |
Solve : Counting in batch file?? |
|
Answer» HI, i would like to create a batch file thats says how MANY time(s) you already opened it. example: if you open it for the first time it must say: you opened it 1 time(s). If you open it for the SECOND time it must say: you opened it 2 time(s) . If you open it four the thousand time it must say: you opened it 1000 time(s). [glb]Can somebody help me[/glb] please, i tried so long, but i just can't find how to do it. P.S. excuse me for my bad very bad english, i'm from Holland You would need an external file to keep a counter. Each time the batch file RUNS, you would read the file, increment the counter, write the new value to the file, and return the counter value to the user. If you have a 2000 or XP machine, you could use the FOR command to read the file, the SET command to increment the counter, and the ECHO command to update the file and return the value to the user. If you have a Win9x machine, the SET command does not have the functionality to do arithmetic. Good luck. how do you have to set that it have to count each time +1 i can do something like that: @echo off if exist %temp%/firstime.txt goto exist echo this is you first time >> %temp%/firstime.txt ECHO first time goto end :exist this is not your first time goto end :end pause that's for looking under windows xp if its the first time or not, but i would like that my program looks more than just the first time, so it olso can look if it is the hundertst time Here a little code to count lines in a textfile: (It works with NT4 so it should also do it in XP also.) *************** set log=c:\test.txt set sitem=opened echo opened >>%log% For /F "tokens=3 delims=:" %%A in ('Find /c "%sitem%" %log%') Do Set RN=%%A echo %RN% set source= set RN= set log= set sitem= ***************** Hope this helps uliThis script works , THANK you very much greetz, black berry |
|
| 4139. |
Solve : text/graphics output issues(vga?)? |
|
Answer» hardware: |
|
| 4140. |
Solve : Batch File Upload to HTTP/FTP Server? |
|
Answer» While I've found a few sources that say uploading with a batch file to an FTP Server is much easier than an HTTP server, however I would prefer an HTTP Server. Information on both endeavors would be appreciated as I haven't completely made my decision. Certainly..... Via FTP!I didn't know you could FTP into a HTTP server. News to me. :-/ Although my server is acting up lately. :( Got it working for a while with the ports forwarded and everything, but now the only way I can ACCESS it is with http://localhost:8000 not the external IP 70.36.xx.xx:8000 that is forwarded to 192.168.1.101 (My server's address.) Or with http://192.168.1.101:8000. EDIT 1: Why won't my smileys show up? I tried to ftp into my Apache HTTP server, and it couldn't connect. :-/ Did I not understand you correctly? :-?As you suspect, HTTP and FTP are two completely different services. The trick is that they can both point to the same folder/directory. Is this your own web server you're running? If so, you'll also need to run a (secure) FTP service to achieve a satisfactory result. What web server are you using? IIS has a built in FTP component.Yes, this is my own web server, and I'm running Apache 2.0.55. Would this Cerebus FTP server suffice, or is it something different entirely? :-? http://www.cerberusftp.com/ Yes, that would do it, although I'd be inclined to use one of the open source offerings rather than a commercial product. (The open source movement excels in this area.) What platform are you using for your server (Windows/Linux)?I'm using Windows. Would I have to run the FTP Server on a different port? :-?The default port for HTTP is 80, and the default port for FTP is 20, so yes, they would be on different ports. |
|
| 4141. |
Solve : .bat file making search and replace in text file? |
|
Answer» Does anyone know how to write a .bat that looks for a string in a text file and replaces it with something else? SET /?THANKS! I have tried this but it does not run as I expected. I have the file test.txt containing the single word "Charlie". the bat script looks as follows: set var= for /f "tokens=*" %%A in ('type test.txt') do set myVar=%%A echo %myvar% set str1=Charlie set str2=Bob %myVar:str1=str2% echo %myvar% _______________________________________ ______________________ Now when I run this it returns/echos: C:\Transfer>set var= C:\Transfer>for /F "tokens=*" %A in ('type test.txt') do set myVar=%A C:\Transfer>set myVar=Charlie C:\Transfer>echo Charlie Charlie C:\Transfer>set str1=Charlie C:\Transfer>set str2=Bob C:\Transfer>Charlie 'Charlie' is not recognized as an internal or external command, operable program or batch file. C:\Transfer>echo Charlie Charlie _______________________________________ ___ so the %myVar:str1=str2% try to execute the content of str1?????? What did I miss???The sentence %myVar:str1=str2% return a new variable where it's been replaced the word "str1" for "str2". You would need: set myVar=%myVar:str1=str2% But in 'myVar' there isn't the word "str1". I have tried to put: set myVar=%myVar:%str1%=%str2%% but it seems that it doesn't admit variables within variables. If you run a subshell cmd /v: on, the next work: Code: [Select]@echo off for /f "tokens=*" %%A in (test.txt) do set myVar=%%A echo %myvar% set str1=Charlie set str2=Bob set myvar=!myVar:%str1%=%str2%! echo [ %myvar% ]Batch coding was never meant to do much more than run programs sequentially. Using batch as a programming language is like using a SPOON to dig the Panama Canal. Yes, it can be done, but it's not the best tool for the job. Code: [Select]Const ForReading = 1 Const ForWriting = 2 Const FileIn = "c:\test.txt" Const FileOut = "c:\test.txt" '<== Change to prevent overwrite of original file Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(FileIn, ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, "Charlie ", "Bob ") Set objFile = objFSO.OpenTextFile(FileOut, ForWriting) objFile.WriteLine strNewText objFile.Close Save the script with a vbs extension and run from the command line as: cscript scriptname.vbs. As WRITTEN, the script will overwrite the original file. You can modify this by changing the FileOut parameter. Just my 2¢ worth. 8-)Thanks Carlos! You are a Star!!! That works briliant! This really helped me out. Ah Yes. I have THOUGHT of looking in to vbs just have not had time yet. I might just do that in a hurry now though. Thanks.Since this is DOS FORUM here is a possible DOS solution ... At http://dostips.cmdtips.com/DtCodeBatchFiles.php you can find a section about [highlight]String Substitution[/highlight]. It shows a batch file that replaces text in a text file. The main task is being done by a few lines of code similar to this: Code: [Select]SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION REM -- Parse each line REM -- Trick, add line numbers using find command, to preserve empty lines set src=<source file> set str1=<old string> set str2=<new string> for /f "tokens=1,* delims=]" %%a in ('"find /n /v "@#$PreserveEmptyLines$#@" "%src%""') do ( if "%%b"=="" ( echo. ) else ( set line=%%b call echo.!line:%str1%=%str2%! ) ) Due to the nature of the FOR command and Delayed Expansion, some restrictions for the content of the text file apply. Hope this information is useful for somebody I just figured out that find /v "" filename.txt returns all lines of a file, so the funny @#$PreserveEmptyLines$#@ is not needed. The for command can be written like this: for /f "tokens=1,* delims=]" %%a in ('"find /n /v "" "%src%""') do (... |
|
| 4142. |
Solve : Help needed!? |
|
Answer» :-? Right i've been trying to install a game CALLED 'Dune 2000' but when i CLICK install all i get is '16 bit Windows Subsystem |
|
| 4143. |
Solve : Is it possible to export files using the Command p? |
|
Answer» Hello, |
|
| 4144. |
Solve : CD Command in MS DOS? |
|
Answer» I am trying a SIMPLE change directory command to access my Program Files folder. I've tried what seems to be every syntax option available but am unable to get it to work. I can cd all over the place but am unable to get in here. |
|
| 4145. |
Solve : How do you make batch files change Wallpapers?? |
|
Answer» I need some help with this. |
|
| 4146. |
Solve : some help for a confused dos noob? |
|
Answer» well i wanna run this old computer i have(windows 98) in pure dos but the SOUND card isnt being detected its a sound blaster live and the model number is SB0200(which i hav researched a bit about its a tricky card) i keep getting the device is not detected in the dos screen and i was wondering if anyone knew what seetings could b changed to fix this? o btw i changed some stuff in autoexec.bat but i dont know how to change it back now is there a way? It depends on what you have done. Sometimes, you may have a file with a name like autoexec.bak, etc which may have a previous version. Never play with something you don't understand. Perhaps you could post your file for review. If you can boot to windows, open it in notepad and make the changes. If you can only boot to DOS, open it with Edit and make the changes.i can only boot in dos but my bro took over and hes changing some stuff and i think we r running the gmae in windows but idk....o and yes i hav a nasty habit of playing with things i dont know but how else will i learn? ive always fixed it b4 anyway thanks for the help( i did edit the things tho not entirely sure if theyre right but ill find out)Quote ..o and yes i hav a nasty habit of playing with things i dont know but how else will i learn? Oh, reading and asking come to mind. pffft who needs reading when u can just play with it How's that working for you right now? well my bro took it over and i dont talk to hiom while hes working in case hes frusterated and snaps but id say pretty well things seem to b going well even if i couldnt get it working.... |
|
| 4147. |
Solve : deleting temparory internet files? |
|
Answer» does sombody knows how to delete the folder |
|
| 4148. |
Solve : h. Help with restarting in DOS...? |
|
Answer» How? In Window's XP. And actually I kinda can't get into windows right now because I keep getting this error about Lsass.exe and then the comp automatically restarts. All I really wanna do is wipe the hard drive, though. So how do I get into DOS so I can do that?as far as i know you can't restart in win XP into dos but what you can try is to restart adn while its loading keep hitting F8 until it SHOWS a menu to pick safe mode w\e and there pick safe mode whith command prompt. as far as i know that's the closest thing to DOS on a XP machine. or in the menu where you can pick safe mode you can try to pick disable automatic restart on system faliure or somethin like that. just ideasBoot with your legal XP disc in the drive and go from there. DOS is not present in XP and that will not help anyway. Quote And isn't the command prompt the same thing as DOS? It seems like it to me...they both have the format c command, and thats good enough for me.. They are absolutely not the same, although they have some similarities and mutual commands. You have mentioned one. Good luck, and post back if problems. |
|
| 4149. |
Solve : Networking MS-DOS 6.22 to win xp, is it possible?? |
|
Answer» I am wondering if it is possible to NETWORK a machine running ms-dos 6.22 (no windows installed, only ms-dos 6.22) to a win xp machine? |
|
| 4150. |
Solve : batch file to execute 200 files in 1 line? |
|
Answer» ok guys, here is the problem, i have 222 files that need to run, one after the other with a gap of about 15 sec. now i know i can type them all into one file, might as well DOUBLE click on each until im done, but i know there has to be a way, to make it run thso files one somewith LIKE run * or soemthing. please help. :exclamation :exclamationWhile I don't have the answer to your question. |
|