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.
| 6201. |
Solve : Starting Independent Processes via DOS Command Line? |
|
Answer» Hi all. This will be running on Windows Server 2003 Standard, using whatever DOS interpreter is installed standard there. You've left DOS behind, pal! You're in NT territory now... What is in the batch file? Have you tried something like this... Code: [Select]start "" "some-executable.exe" "parameter 1" "parameter 2" "etc" start "title" "path-to-executable""parameter 1""parameter 2".... "Title" can be a null string but should not be omitted... Example:- Code: [Select]@ECHO off start "" "C:\Program Files\Internet Explorer\IEXPLORE.EXE" exit IEXPLORE will continue running after the batch has finished. Unless you want it hidden, like the batch file is doing something but you cant see it......Yeah, I'm using: Code: [Select]C:\>START [application name and parameters here] The problem I'm having is that the process the START command is creating will stop if the original CMD instance is CLOSED or stopped. I'm TRYING to figure out if there's a way to spawn a completely new and independent process. I think the problem I am having is with my environment - it is a Java web server that's making the call to the command line. contrex's solution works fine under normal circumstances. I just think I've got abnormal circumstances... Thanks for all your suggestions! |
|
| 6202. |
Solve : Linear Displacement..? |
|
Answer» To start of right away, Somebody asked me to make something to prompt the FOLLOWING text: |
|
| 6203. |
Solve : reset themes? |
|
Answer» i have a bunch of premade themes, but could i APPLY them using COMMAND prompt.Themes as in backgroudn pictures, WINDOWS themes (CHANGES the look of TOOLBAR and stuff) or screensavers? |
|
| 6204. |
Solve : search 2 files with same name? |
|
Answer» Hi, |
|
| 6205. |
Solve : View MBR Data from DOS???? |
|
Answer» ANYONE know if you can view the contents of the MBR data of a HD through a DOS command of some sort or any special software??? Working on an issue with Ghost 2003 and a Hard Drive with 4 partitions where it complains that there is not enough free space on the MBR to create a virtual partition needed for Ghost operation. If you dump the 4th partition and go back to 3 partitions, Ghost will work ... Just curious as to how jam packed the MBR is to not allow for the 4th needed partition and if some fluff can be removed to allow for it to squeeze in to the MBR. Have been tempted to just go the work around route of install a second HD and install Ghost on that drive to then be able to clone the drive with 4 partitions from a virtual partition (swap) off of the 2nd physical drive, but if that is not needed, I'd LIKE to avoid it and learn more about making changes to the MBR if permiited to do so... I do know that a mistake in the MBR would be very bad, so I would copy the data from the 4 partitions elsewhere while I tinker to see if it can fit.There is an older program that will do just this called MBRWiz...see if you can find it on the web if not let me know and i'll DIG it out of my archives... It's a dangerous tool when not used properly if you know what i mean but i had good luck with it. If MEMORY serves me correct i believe depending on the file SYSTEM the MBR is limited to 64K, but don't quote me on that one. It's been awhile.Try: http://mbrwizard.tripod.com/ http://mbr.bigr.net/MBRWiz153.zip http://www.geocities.com/mbrwizard/index2.html |
|
| 6206. |
Solve : Net Start crashes Dos 6.22 with Himem.sys loaded? |
|
Answer» I need to GET this working. I am running dos 6.22 in virtual PC 2007. I have all my drivers installed, etc but when i RUN "NET start" the system hangs after showing the nic info. If i remove himem.sys from config.sys it works great. Any ideas? |
|
| 6207. |
Solve : Need help accessing cdrom drive in config.sys? |
|
Answer» I need to make a boot floppy that grants cdrom access in the beginning of config.sys |
|
| 6208. |
Solve : convert decimal to hexa? |
|
Answer» Hello everybody |
|
| 6209. |
Solve : Hidden file? |
|
Answer» I want to make a file to be hidden. How can I do it in DOS??attrib +h file10x How about showing (super)hidden files on dir command then?well to show the file again its attrib -h fileQuote from: NiTeCr4Lr on April 25, 2007, 02:43:28 PM How about showing (super)hidden files on dir command then? You can find this out yourself!!! Just type DIR /? at the prompt and then READ the help text. It is good to help people but they MUST learn to help themselves at some point. EVERYBODY who wants to use the command line should read a good tutorial and do plenty of experiments. This is a subject where an ENQUIRING mind is absolutely needed! You use DIR with the /A switch. A is for Attribute. DIR /AH shows all hidden files or folders. Other SWITCHES are /AS (system files) /AR (read only) /AD (only show directories) /AA (show files ready for ARCHIVING). They can be accumulated thus DIR /AHRS. Use a minus sign to indicate the opposite so e.g. DIR /A-D will exclude directories from DIR's listing. |
|
| 6210. |
Solve : Update bat file contents? |
|
Answer» I search and found many close examples, so posting this request, easy for some people here Im sure. |
|
| 6211. |
Solve : File managing White use of batch files? |
|
Answer» I have WINDOWS XP SP2. |
|
| 6212. |
Solve : Change Computer Name from DOS Shell ???? |
|
Answer» I was wondering if there was a way to change a computer name from the DOS shell over the network to another computer by communicating by IP and not by NAME ... Reason why I ask is because we have 3 cash registers which are running XP Embedded OS, and I have to change the system names to POS(x)- Location, and we have 3 systems that are not named in this standard of POS(x) where x = lane ID - Location such as POS3-LEBANON. |
|
| 6213. |
Solve : How can we Modify a .sql file without changing the timestamp? |
|
Answer» HI all, I have a folder of say 500 .sql files. I am planning to modify the CONTENT of all the files in ONE shot. But i dont want to change the Created, Modified or Accessed timestamp of the file. Is this possible. There should be some TOOL which when given with 2 folder with source (Source files) n destination folder (Modified files) automatically reads the all the 3 timestamp from source file name and apply it to the same file in destination folder. Let me know if someone can help. Thanx Raj |
|
| 6214. |
Solve : con & prn?? |
|
Answer» in cmd, and windows.. why does TYPING 'con' or 'prn' = blank ? MS-DOS supports five standard character devices which can be used by name as read or write destinations (according to their capacities). ...courtesy Allenware.com Quote from: Diablo416 on April 26, 2007, 02:59:09 PM also , clock\$ returns "the system cannot find the file specified" why? Please explain a bit more what you're trying to do here. |
|
| 6215. |
Solve : New Account on a flash drive? |
|
Answer» is it possible to make a NEW account on a flash drive, |
|
| 6216. |
Solve : Need just the pathname? |
|
Answer» I've got a bat file that will QUERY the registry for a setting and it gets string just fine, but the string data includes a filename and I want just the pathname from that. |
|
| 6217. |
Solve : MOVE command with network drives? |
|
Answer» Hi, I am trying to create a batch file that will move files/documents from multiple locations on a shared network drive into one directory (EITHER local or networked). |
|
| 6218. |
Solve : Copying Mulitiple Files in Order? |
|
Answer» Hi, |
|
| 6219. |
Solve : Listing lines which appear in FILE1.TXT but not FILE2.TXT? |
|
Answer» Hello, Normally files to be compared should be in sequence (not calendar sequence but ascii or unicode sequence). Batch code has no random or direct i/o only sequential which can only be used in the confines of a loop which the user cannot directly control. I am unsure of the RELEVANCE of these remarks? Code: [Select] @echo off REM Quick hack... REM diffline.cmd REM syntax diffline file1 file2 REM in a loop, read every line in file 1 for /F "delims==" %%a in (%1) do ( REM and try to find it in file 2 REM echo the line if NOT found type %2 | find "%%a"> nul || echo %%a ) REM in a loop, read every line in file 2 for /F "delims==" %%a in (%2) do ( REM and try to find it in file 1 REM echo the line if NOT found type %1 | find "%%a"> nul || echo %%a ) Code: [Select] I:\test>type file1.txt C:\January C:\February C:\March C:\April C:\May C:\June I:\test>type file2.txt C:\June C:\May C:\March C:\February C:\January I:\test>diffline file1.txt file2.txt C:\April I:\test> Code: [Select]I:\test>diffline file1.txt file2.txt > diff.txt I:\test>type diff.txt C:\April I:\test> Thanks contrex. That's brilliant. One further slight complication / question... :-) Is there any way to get it working if FILE1.TXT contains a double-quote character? Find.exe reports an error SAYING "Parameter format not correct" if its search string contains double-quote. Not to worry if this isn't possible, because I have a utility (called FRT.EXE -- Find and Replace Text) which can pre-processs the files by SUBSTITUTING all double-quotes (hex 22) with two single-quotes:- Code: [Select] @echo off REM Quick hack FRT.EXE -C %1 \x22 '' FRT.EXE -C %2 \x22 '' for /F "delims=" %%L in (%1) do (type %2|FIND.EXE "%%L">nul || echo %%L) Thanks again, JamesHi contrex, I did find a small bug in the above code, regarding listing text lines which appear in FILE1.TXT but not FILE2.TXT. The good news is I've fixed the bug. See new version below, which also handles double-quotes without needing any pre-processing :- Code: [Select]C:\> type diffline2.bat @for /F "delims=" %%L in (%1) do @( set DIFF_LINE1=%%L& set DIFF_LINE1=!DIFF_LINE1:"=DOUBLEQUOTE! set DIFF_FOUND=0 for /F "delims=" %%M in (%2) do @( set DIFF_LINE2=%%M& set DIFF_LINE2=!DIFF_LINE2:"=DOUBLEQUOTE! if "!DIFF_LINE1!"=="!DIFF_LINE2!" set DIFF_FOUND=1 ) if !DIFF_FOUND!==0 echo %%L ) C:\> type file1.txt C:\DIR1 C:\DIR12 C:\DIR123 C:\> type file2.txt C:\DIR1 C:\DIR123 C:\> diffline2 file1.txt file2.txt C:\DIR12 C:\> NOTE that this batch file MUST be run with cmd.exe "/V" flag, because it requires "delayed environment variable expansion". Batch file will NOT work correctly without cmd.exe "/V" flag. Batch file tested using Windows XP [Version 5.1.2600]. Best regards, JamesThis batch file can also be used to list lines which are output from 'COMMAND1' but not output from 'COMMAND2'. For example:- Code: [Select]C:\> DIR /b folder1 alpha.txt beta.txt gamma.txt C:\> DIR /b folder2 alpha.txt gamma.txt C:\> diffline2 '"DIR /b folder1"' '"DIR /b folder2"' beta.txt C:\> (Note batch file must be run with cmd.exe "/V" flag, because it requires "delayed environment variable expansion"..) Regards, JamesFound another couple of bugs in the above DIFFLINE2.BAT :- (1) Failed to work correctly for text line STARTING with ";" (simi-colon) (2) Failed to work correctly for text line containing "!" (explanation mark) I've fixed the first of these bugs. See DIFFLINE3.BAT below. Cannot fix second bug. Work-around is to pre-processs files by substituting all explanation marks with another character. Code: [Select]D:\> type DIFFLINE3.BAT @echo off REM **** DIFFLINE VERSION 3 (1st May 2007) REM **** List text lines which appear in "%1" but not in "%2" REM **** MUST be run using "CMD /V" to enable delayed environment variable expansion REM **** FAILS to work correctly if text lines contain "!" (explanation mark characters) for /F "eol= delims=" %%L in (%1) do ( set DIFF_LINE1=%%L& set DIFF_LINE1=!DIFF_LINE1:"=DOUBLEQUOTE! set DIFF_FOUND=0 for /F "eol= delims=" %%M in (%2) do ( set DIFF_LINE2=%%M& set DIFF_LINE2=!DIFF_LINE2:"=DOUBLEQUOTE! if "!DIFF_LINE1!"=="!DIFF_LINE2!" set DIFF_FOUND=1 ) if !DIFF_FOUND!==0 echo %%L ) D:\> type test1.txt ; ;;; ! !! !!! " """ & && &&& < <<< | || ||| > >>> ;!"&<|> ;!"&<|>. ;!"&<|>.. D:\> type test2.txt ; ;; ;;; ! !!! " "" """ & &&& < << <<< | ||| > >> >>> ;!"&<|> ;!"&<|>.. D:\> DIFFLINE3 test1.txt test2.txt && || ;"&<|>. D:\> DIFFLINE3 test2.txt test1.txt ;; "" << >> D:\> Regards, James |
|
| 6220. |
Solve : .bat file to create desktop shortcut? |
|
Answer» Sorry, but it has been a long day, and my brain (apparently) is spent. I have created a file on our server and I want to send a .bat file to my employees that will create a desktop shortcut on their individual machines. Here is what I have tried: |
|
| 6221. |
Solve : Moving certain file sizes? |
|
Answer» How would you make a Batch file that moves any file over a certain size to another location?Q: How would you make a Batch file that moves any file over a certain size to another location? I know you can move files but do you want to move files of a specific size like above 2mb?Yes (well, above 200kb, actually). So, you got any ideas?I dunno, hang tight and maybe someone else will have the answer to that. Does it have to be above 200kb, why not the name of the file instead?Quote from: Carbon Dudeoxide on May 01, 2007, 12:47:28 AM I dunno, hang tight and maybe someone else will have the answer to that. I can't use the file name because the point of my program is for the user to just open the batch file and VOILA, instead of having to access to the folder and renaming every file that needs to be renamed (as it is now, I manually changed the name of the ONLY large file, but it won't work on other computers).the below is an example script. change the for loop parameters to suit your needs Code: [Select] for /F "tokens=4* skip=4 delims= " %%A in ('dir /A-D') do ( REM files greater than 40 bytes if %%A GTR 40 ( echo %%B %%A rem your move command here ) ) Thanks. Can you explain what the code means (The command prompt explanation for FOR is a bit too complicated...)?delims mean delimiters so "delims= " mean i am going to use spaces as my delimiter from the dir /A-D output. each "field" separated by the delimiter i call them tokens, so tokens=4* means i am going to get token number 4 onwards, which from the dir /A-D output, is the size in bytes at token 4. Then in the for loop, when i echo %%A , it will the bytes, and if i echo the next token , denoted by %%B, it will be the filename. I hope you understand what i am saying. |
|
| 6222. |
Solve : changing file type of everything in a folder? |
|
Answer» How WOULD you change the entire contents of a folder into the same file type using command prompt? |
|
| 6223. |
Solve : Two questions about Auto Shutdown code? |
|
Answer» Hi, I has questions about the auto shutdown thing in command prompt, so if you'd please be kind enough to answer em, that'd be grand For a batch file, use this: It doesn't work when you put it in a batch file and try to OPEN it. It just repeatadly displays the code.Quote from: Dark Blade on April 20, 2007, 07:55:48 PM It doesn't work when you put it in a batch file and try to open it. It just repeatadly displays the code. What do you mean by "displays the code"? Do you mean loading it into notepad? Are you double clicking the batch file? How do you normally run batch FILES? This is what I use to shut down my computer. I have been using it every day for about 2 years in a batch file. Works every time. No quotes around the time parameter either. Actually I always use the .cmd extension rather than .bat these days to get the advantages of Windows XP's cmd.exe. i wonder if this makes a difference? Code: [Select]shutdown -s -t 01 -c Code: [Select]shutdown -s -t 01 -c You don't actually need to have -c (that displays a MESSAGE). But it might work differently in .cmd. Nope. I tried that, it does that same as .bat. Quote What do you mean by "displays the code"? Do you mean loading it into notepad? Are you double clicking the batch file? How do you normally run batch files?I save the code as a batch file, and when I open it (double click), displays: Code: [Select]shutdown -s -t 30 shutdown -s -t 30 shutdown -s -t 30 shutdown -s -t 30 shutdown -s -t 30 shutdown -s -t 30 And just says that a lot. Just to make sure, are you typing the code in notepad, saving it to the desktop as name.bat and double clicking 'name.bat' ?Quote from: Dark Blade on April 21, 2007, 05:55:59 PM You don't actually need to have -c (that displays a message). But it might work differently in .cmd. I accidentally cut off the rest of the line. It should read shutdown -s -t 01 -c "System closing down!" Quote I accidentally cut off the rest of the line. It should readOK. Quote Just to make sure, are you typing the code in notepad, saving it to the desktop as name.bat and double clicking 'name.bat' ? Yep. I do that, and it does exactly what I said before (even if I save it as .cmd, not .bat).A long shot... http://www.aumha.org/win5/a/shtdwnxp.php In fact that page is full of shutdown problem tips. It seems a shutdown batch file can hang sometimes for example as here, but there are other causes. Google for "shutdown batch hangs" Quote USING SHUTDOWN SCRIPTS & 802.1x AUTHENTICATION PROTOCOL. This combination can cause Win XP to take in excess of 10 minutes to shutdown normally. (IEEE 802.1x is an authentication standard for both wireless networks and wired Ethernet networks.) Here’s how the dominoes fall: The 802.1x authentication protocol stops after the user logs off. Shutdown scripts run after the user logs off. If the script is on a network share and the connection is no longer available (since authentication has terminated), the script can’t run. The default time-out for shutdown scripts is 10 minutes. So the computer sits there 10 minutes before continuing with its shutdown. Anyone know how to give said batch file a trigger, such as when a specified file is accessed? All, Try using the following to shutdown Windows XP from an MS-DOS batch file:- start shutdown.exe -s -f -t 0 Works for me. Hope that helps, James |
|
| 6224. |
Solve : How to creating empty file?? |
|
Answer» Helo everybody |
|
| 6225. |
Solve : Want to make filename UPPERCASE? |
|
Answer» Hi all, |
|
| 6226. |
Solve : What does FOR do?? |
|
Answer» Can someone explain what the Command Prompt command FOR does? |
|
| 6227. |
Solve : I want some help with Focusing? |
|
Answer» I know that it is not possible to focus a window in dos, |
|
| 6228. |
Solve : XP Search command? |
|
Answer» Hi there, |
|
| 6229. |
Solve : Need help in fetching datas from a log file? |
|
Answer» hi GUYS, |
|
| 6230. |
Solve : Need a help? |
|
Answer» HAI friends i need a help from you . my problem is i need to copy a files and folders from network clients to my server .like network backup purpose .Each and every restart inned to copy a files new CHANGES in thats folder . for example following folders i ned to TAKE all clients and save to client NAMES individuly C:\Program Files\Microsoft Visual SourceSafe C:\Program Files\Microsoft SQL Server C:\Documents and Settings\All Users This all save to \\192.168.100.22\backup ( This is netowkr shared folder ) how to make a batch FILE pls help me i am very new for this kartook |
|
| 6231. |
Solve : i need simple help? |
|
Answer» ok if its POSSIBLE, and it should be, i want to make a message (any noticable message) to APPEAR on my computer via a batch file. I want it so it will do the regular tasks i have the it programmed to do only pop up with a message i make when it is in the MIDDLE of executing all the tasks. If you're using MS-DOS, you're probably limited to the echo statement. If you have a windows machine, SOMETHING like msg %username% message might work for you. The latter requires a response to dismiss the window but the batch file continues to execute. |
|
| 6232. |
Solve : Anybody have a good DOS 'Insert' script?? |
|
Answer» I was wondering if anyone had created an insert script that could do the following: |
|
| 6233. |
Solve : FOR LOOP questions? |
|
Answer» Can someone tell me how to use for in MS-DOS FOR LOOP |
|
| 6234. |
Solve : MAC address?? |
|
Answer» Is there a DOS code sow you can see your MAC adress? |
|
| 6235. |
Solve : FOR question (related to folder creation)? |
|
Answer» Whenever I run this I can see it copying the log files but it then creates a file named new folder instead of a folder. How to I modify this to CREATE the destination folder for me? Or do I have to create the destination folder before I run this? can you tell me why the second variable %%G has to be in quotes in order for this to work? The quotes ACCOUNT for any embedded special characters and/or spaces in the path/file names. If all the files are bring copied to the same destination, use MD to create a directory prior to the FOR. Your logic doesn't show it, but if you needed multiple destination DIRECTORIES, you'd need to create directories within the FOR loop Good LUCK. Ok, thanks for explaining that. Didn't even cross my mind to use md to create the dir. |
|
| 6236. |
Solve : Pb with Findstr and applying filters on extention file? |
|
Answer» hello everybody, |
|
| 6237. |
Solve : need Help "Copy"? |
|
Answer» NEED help, i want to COPY all the D: DRIVE .txt files to C:\folder\ how to WRITE in cmd.exe? Hope can help you. Code: [Select]XCOPY "d:\*.txt" "c:\folder\" |
|
| 6238. |
Solve : "Find" does not work? |
|
Answer» Hello I am programming a batch file for windows XP. The programma has to copy and UNZIP a file if the zip file on the netwerk (F:) is newer then the file on the computer (C:). This is what I have untill now, the function FC RETURNS if the files are the same "FC: geen verschillen gevonden". And with the Find function i try to find that. But i think the find function doesn't work. What is needed to get it working? Or is there a other way, to do this? |
|
| 6239. |
Solve : Delete some directories question? |
|
Answer» I use deltree this command to delete some directories in other computer's DOCUMENTS and SETTINGS |
|
| 6240. |
Solve : Creating List file from a directory and comparing it with another list? |
|
Answer» I have not USED Batch process to a very extensive way and Now I have few requirement to do so.Please help me to figure out the code. |
|
| 6241. |
Solve : Problems with braces in batch files? |
|
Answer» Hi all, |
|
| 6242. |
Solve : DOS programs won't work under Windows XP? |
|
Answer» Excellent ! Excellent ! That word makes me laughu know my problem is a bit different ,i have had problem SINCE the very first TIME i RAN pascal in command prompt and it doesn't work in fullscreen mode any ideas? im running windows xp sp2 and my cpu is intelHow about a new THREAD for your UNIQUE issues? |
|
| 6243. |
Solve : Accept File Name To Delete From User in DOS? |
|
Answer» Hi Everybody, |
|
| 6244. |
Solve : Unzip using Batch Command? |
|
Answer» Hi Friends, |
|
| 6245. |
Solve : net send in a batch file?? |
|
Answer» Hey all! Hey HDL_CinC_Dragon, you should start a new thread that way, you do not get confused and we do not get confused. Sorry. Next time ill just start a new topic. Quote HDL_CinC_Dragon, Thanks Quote Xsix, Dident work? Can it run in windows xp? i tryed both methods you suggested; Double Click: Opens up the windows and closes down so fast i almost cant even see it. Run from the cmd: It displays the line in the cmd, but it dosent run it/use it. :/My error From a batch file, you need double percent symbols: for /L %%i IN (1,1,999) DO net send * "YOU JUST GOT OWNED!" To run from the command prompt, use single percent symbols: for /L %i IN (1,1,999) DO net send * "YOU JUST GOT OWNED!" 8-) Next time please try for something constructive.working Thank you very much Sidewinder rofl i just tested Code: [Select]for /L %%i IN (1,1,999) DO net send * "Testing" on my home computer and it sent the message "Testing" to every computer i dont even know how many times... but I can tell you it sent 15m/s (messages per second) for a pretty interesting amount of time lol. Luckily only mine and my moms computer were online now i gotta close em all.... one at a time... :sigh: |
|
| 6246. |
Solve : Batch to Trigger Modem to Dial Cell Phone? |
|
Answer» WORKING on a batch that runs in a loop to test systems, then trigger a modem event to call my cell phone, then hang up after 10 seconds.... Any suggestions on how to get my 56k PCI US Robotics Modem to dial thru a batch or a free or inexpensive program that can be added to my batch to launch and prank me when there is a failure to be notified about. My plan is to share a fax line with a system monitoring other servers and systems, and when a fault is detected, dial my cell phone. For the fact that I know that no one would ever call me from the fax number, and my cell phone has caller id... it would work perfect to alert me to remote in asap to see whats gone wrong from anywhere that has a cell signal. I was thinking of using a really old copy of Kermit, but it doesnt have the ability to dial and hang up after 10 seconds. Thanks... DaveFound a solution...Figured I would share it in case anyone else wants to do something like this. Here is what I have done. 1.) Took a Pentium II system running Windows 2000 Pro and it has a 56k modem installed. 2.) Created a Dial-Up configuration for what would normally be used for dialing into an ISP, but instead replaced the ISP DUN number with my cell phone number. 3.) Used a Macro RECORDER called JitBit Macro Recorder ( http://www.jitbit.com/macrorecorder.aspx ) that I purchased to record the process of what normally would be to dial up to an ISP DUN service, but its calling out to my cell phone. I then wait about 10 seconds and tell the computer that I want to cancel the call to my cell phone. I then compiled this macro into an EXE, which can be executed anytime on this system ( from within a batch ). 4.) Added a line branching off a goto statement in my batch to execute CallMe.EXE ( JitBit Macro ) 5.) Saved Batch and started batch that runs in a loop. This Pentium II system is then able to monitor servers and if a failure CONDITION is met, it triggers execution of the CallMe.exe custom ( mouse/Keyboard event macro ) and I get the phone call... No more getting calls from end users hours after a failure. Now I get it within minutes, and can respond quickly to resolve the problems before the users start to see the problems. Thanks for looking this post over and CONSIDERING ideas.... Dave |
|
| 6247. |
Solve : how to write bat file incl many commands?? |
|
Answer» I have such commands in ORDER to test the printer under DOS. |
|
| 6248. |
Solve : Batch to read from file? |
|
Answer» On another project I am working on, I am looking for a way to READ a ascii text file say Token.TXT and pass that ascii data read in ENTIRETY until EOF to a VARIABLE to be tested. |
|
| 6249. |
Solve : Couple little questions? |
|
Answer» I searched using the search box and USED several different words to try and find each subject but had no luck. 1 It is in the var %userprofile% . 1) %userProfile% works except it shows the whole path name (C:\Docs...\username). Is there a way to have it only say the username? 2) net view works nicely. thanks Quote 3] Use this pseudo system variable :3) thanks, is there a way to limit to be between 2 CERTAIN numbers? like maybe 50 and 100? or maybe 0 and 100? or something of that nature? 4) is there an actual Else statement in batch programming? so that if the arguments in the previous if statements are false it just does whatever is under the else statement? sorry for being so needy guys....this WEBSITE might be helpful: http://www.ss64.com/nt/ 1. %username% type set to see the defined variables. 3 & 4 is explained here: http://www.ss64.com/nt/if.html hope it helps uli Thanks Uli, the username thing is exactly what I was looking for the Else statement thing appears to only work if you download the resource kit and theres nothing about %Random% on the siteHeres another one, now this one may sound a bit silly but: How do you add an integer variable and an integer together? I cant seem to work it out... maybe im setting my variable wrong in the first place? Code: [Select]set Dollars=0is there some sort of prefix I need to include? |
|
| 6250. |
Solve : Replace text string in file? |
|
Answer» Okay so my goal is to edit two particular lines in an INI file. The cmd file will be ran on xp clients. The line in QUESTION will be replaced w/ the %userprofile% var. Just doing some searching on google I've found a way to replace one line successfully, but I'm stuck on replacing two. Here is the code I'm using for just the one line: |
|