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.
| 7301. |
Solve : BATCH FILE TO BACK UP PHOTOS TO A MEMORY STICK?? |
|
Answer» Hi guys |
|
| 7302. |
Solve : put time condition in .bat file? |
|
Answer» I create a .BAT FILE to log the WINDOWS startup time under C drive |
|
| 7303. |
Solve : IF ELSE command in batch files? |
|
Answer» Hi All... Hi All... Your batch file needs changing. When a line is finished, it passes to the next one. In the "success" situation, it will pass to the the next line. This is the :END label. This is what I SUGGEST @echo off IF "%1"=="" GOTO fail echo success goto end :fail echo failure :end pause |
|
| 7304. |
Solve : IF command to run new bat file? |
|
Answer» I am somewhat of a newbie at bat files, so I HOPE I can explain this clear enough.. I am trying to get another bat file to run if any file in a certain folder has been modified today. So basically , if "c:\*.doc" was modified today then run "modfile.bat" and if no "c:\*.doc" files where modified today then run "nofile.bat" |
|
| 7305. |
Solve : Unmountable boot volume error message!!!? |
|
Answer» I received this error message when I plugged an old printer and cable. Not it won't BOOT. I downloaded a boot CD and copied it USING Nero. When I try to boot up, it displays [DR-DOS] a:\> I changed DRIVE to d:\ to list dir -- it displays winxp_ene exe but I don't know how to reinstall WindowsXP from here! Please HELP!!!See here and here. |
|
| 7306. |
Solve : For loop problem? |
|
Answer» Howdy,
Quote from: contrex on SEPTEMBER 28, 2007, 01:23:54 PM That your IT people are, therefore, dorks?i believe you know who the bigger dorks are?Quote from: ghostdog74 on September 28, 2007, 08:06:35 PM i believe you know who the bigger dorks are? The people who post here asking us to do their jobs or school assignments for them, or us, for doing it? |
|
| 7307. |
Solve : Copy from HTTP location?? |
|
Answer» Hi Guys, |
|
| 7308. |
Solve : shut down win98 on close application? |
|
Answer» well,i'm WONDERING if anyone can help me with this problem.i just wanna shut down the win98 automatically when i CLOSE a application.how can manage it with the batch files? |
|
| 7309. |
Solve : Pre MS-DOS? |
|
Answer» I am TRYING to get an Osborne 1, Portable PC up and running. |
|
| 7310. |
Solve : batch file to replace a document? |
|
Answer» Hi i'm new to batch file scripting and was wondering if ANYONE could help me |
|
| 7311. |
Solve : How do I start an application shortcut from a batch file?? |
|
Answer» The action would be relative to a click action from the start menu. My shortcut calls my application that exists on a different server and I prefer to keep all my apps there. The shortcut also ensures that all of the REQUIRED files are available. |
|
| 7312. |
Solve : DOS question!!? |
|
Answer» Hello guys, SwitchEffect To have access to this list just type chkdsk /? at the prompt... /r should be sufficient.thank you so much Patio!! I'll try that.. |
|
| 7313. |
Solve : reference an exe file in the documents and settings? |
|
Answer» I am ATTEMPTING to CREATE a batch file that starts an exe from an application reference. The application reference is under the “documents and settings” folder. I think the spaces within the folder NAME are interfering with the start commands execution. It cannot FIND the exact path to the file. I am attempting to create a batch file that starts an exe from an application reference. The application reference is under the “documents and settings” folder. I think the spaces within the folder name are interfering with the start commands execution. It cannot find the exact path to the file. I've never heard of an "application reference". If you MEAN the full path and file name of an executable program or any other type of file, if any of these have spaces in them, enclose the whole thing in quote marks thus start "C:\Documents and Settings\Jim\Blah Blah\program.exe" THANK YOU! THANK YOU! THANK YOU! |
|
| 7314. |
Solve : Setup Maps off of two different Usernames? |
|
Answer» I need to setup a batch that will map my the network drives for me based on 2 seperate domain passwords. One Domain uses different username and passwords per user the other the same username and password REGARDLESS. I alos need to disconnect all drives before continuing. So here is what I have so far. |
|
| 7315. |
Solve : How to run Pathping mutiple times and output it to a text file???? |
|
Answer» I need to create a batch script to run the pathping command 10 times in a row and OUTPUT that all to a text file.... |
|
| 7316. |
Solve : Exit Command Twist? |
|
Answer» I am new to command file scripting. What does the "-4" after the exit command do? Welcome to the CH forums. Thank you! Now I get it. It makes sense because the code should not have gotten here if all went well. Thank You! hamelinpiper, you have done this at least twice now! Posting a -- long -- answer when you know nothing about the question! Quote C:\>exit /? |
|
| 7317. |
Solve : Batch file to move files if gtr 0? |
|
Answer» Hey, just stuck on a little something that I'm overlooking obviously. I'm using the following to check for files in a specified directory. If the size is greater than 0, I want to MOVE those that are greater than 0 to an archive folder. |
|
| 7318. |
Solve : batch script that creates directory with successive numbers? |
|
Answer» Hi i am TRYING to create a batch script that will create a directory named test_XX where XX is a incremental number starting from 01. @echo offThanks guys |
|
| 7319. |
Solve : push pop? |
|
Answer» Ok. so i have heard of a WAY to "push" stuff into ram and "pop" it back out ... leaving a computers hard drive untouched (i think this falls in to the field of computer forensics)... the catch is you must push them on in the reverse order of how you want to pop them off.... any info on this topic would be appreciated.Push and Pop are features (commands) in Assembly programming language (the language of the Gods) and I'm sure there are other references to it. As you will see from the following LIFO is the sequence you mention (extract from this site.) public class Stackhttp://java.sun.com/j2se/1.4.2/docs/api/java/util/Stack.html the only problem is you need the JVM installed on your machineTheHamelinPiper, I think perhaps your ideas are running way ahead of your understanding... So you are looking for the stack data structure specifically then. I don't think the cmd shell is advanced enough for this (I might be wrong though). Maybe you should look in to Windows PowerShell. This is the replacement for the old cmd shell and it supports much more advanced operations and utilizes a C# like syntax (which in turn is similar to Java).the stack class in Java is considered a legacy class. ie its old. anyway, the concept of stack class , a higher level view of it, is just simply arrays. most modern prog languages provide arrays,(not batch though) and corresponding methods that allow array manipulation.Quote TheHamelinPiper, I think perhaps your ideas are running way ahead of your understanding... yes. |
|
| 7320. |
Solve : Needing a script to open IE - one site on each monitor (dual)? |
|
Answer» Needing a script\BATCH to open IE - one site on each monitor (dual) |
|
| 7321. |
Solve : Batch - Backingup files when size is under 5 gigs? |
|
Answer» So the helpdesk I work at is filled with...well lets just SAY not the most competant bunch and backing up files is a pain. I FIGURED creating a batch file will let them just back up with a single push and a few choices so even a monkey could do it. |
|
| 7322. |
Solve : hard disk after booting....? |
|
Answer» I have Windows Xp and I have made a BOOT disk on a floppy. When I start the computer with the floppy in, after finished the booting sequence, if I type from the prompt "C:" it says "invalid device name"... how is it possible? thanxWelcome to the CH forums. |
|
| 7323. |
Solve : NTBACKUP vx XCOPY? |
|
Answer» What is NTBACKUP? just a frontend for xcopy? xcopy seems to take much longer (and yes i know how to set/use the archive attribute) ALSO is there a way to store a backup drive as .bkf & what exactly are the differences between .bkf and a regular file structure? .bkf - Catalog of files backed up USING WINDOWS Backup Utility; included with Windows NT and XP Pro (located in Programs->Accessories->System Tools); must be installed from the XP Home installation disc to be used with Windows XP Home Edition. .bkf file format is MTF. Google BRINGS up good reading. Try this and this and this. Thanks... sorry for so many POSTS. i dont wanna spam. |
|
| 7324. |
Solve : Resolving Parameters in a Batch program? |
|
Answer» I've been using batch programs for ages, but I'm in a situation here where I would like to not run the program from a command prompt in XP, but while the batch is running, allow the user to enter the parameters to be resolved as the %1, %2, etc. that would normally be entered after the myjob.bat. @echo off set /p syntax... set /p variablename=prompt string for user [%] The % SIGN is optional; I use it so there is a space between the end of the prompt string and the flashing cursor at which the user input will be typed. If you omit it, the user input follows immediately after the last non-space character of the prompt string, i.e. trailing spaces in the prompt string are ignored. The prompt string is not compulsory... set /p dummy= will wait for a string (i.e. zero or more chars plus ENTER) which might be handier SOMETIMES than PAUSE. That looks like it will WORK, one question though....on the "myjob %param1%....Does that need to be a CALL statement infront or no? I'm used to making a call to another .bat file start with CALL. Thank you,Oh right. I wasn't sure if myjob was a bat or an exe. Anyway, you generally use CALL in a batch file when you want to transfer execution to another batch file and then return when that second batch file is complete. this is batch1.bat:- @echo off (some code) call batch2.bat %param1% %param2% etc (some more code) (some more code) gets executed when (and if) batch2.bat finishes. This is batchA.bat @echo off (some code) batchB.bat %param1% %param2% etc (some more code) batchB.bat starts and runs but (some more code) will never be executed if or when batchB.bat finished because control has passed completely to batchB.bat. For executables (.exe) the situation is that if you just place the executable name in a line, the batch file and hence the command window will wait for it to complete, then executing any lines following. @echo off (some code) program.exe %param1% %param2% (some more code) above, (some more code) gets executed after program.exe finishes. If you want the batch to start the exe and then quit without waiting, you use the START command thus @echo off (some code) start "" "program.exe" %param1% %param2% (some more code) in this one, the program is started and then (some more code) - if present - is executed at once, and the batch will quit if there is no more code. alright, thanks...I'm deep into the batch now and the preliminary testing has been favorable. Thanks for your help! |
|
| 7325. |
Solve : batch files & variables? |
|
Answer» QUOTE from: contrex on September 24, 2007, 12:42:33 PM Quote from: TheHamelinPiper on September 24, 2007, 12:03:19 PM what is are the "%%" about.. i know when using a varible that is already set you surround the var name in then Quote You have "ordinary" variables which are like %this% Quote from: contrex on September 24, 2007, 02:22:04 PM You have 52 possible variables that can exist at the same time in the same batch... %%a to %%z and %%A to %%Z (i.e. case matters) does that apply "across the board" or only for the FOR command? suppose %var%, %var2%....%var52% .. can there be a %var53% OR is that some backwards compatible rule for running on older versions of dos? OR OR did you just mean exactly what you said.. there can only be 52 variables within the same batch (excluding system variables i assume) There can only be 52 of the special FOR variables eg %%A %%z active at any one time within the same batch file. Reason: They are case sensitive and there are only 26 letters of the alphabet. You can have any number of ordinary variables eg %apples% %pears%. Quote suppose %var%, %var2%....%var52% .. can there be a %var53% Sure. There can be a %var99999999% and more... |
|
| 7326. |
Solve : closing a batch? |
|
Answer» i know you can run a batch file using "call ..." but once one is RUNNING can you close it from another batch file?
Ok i tried this but i get the message "taskkill" is not an internal or external command, operable program or batch file please help!!!If you are running an antique OS like 98 or ME I cannot help you. If you are running XP Home or Windows 2000 it is not included I think. Here is a download link. http://home.wanadoo.nl/gigajosh/files/taskkill_en.zip Unzip it and copy it somewhere on your path. The standard place on XP Pro is C:\WINDOWS\system32\taskkill.exe |
|
| 7327. |
Solve : Help With Looping Through Folders? |
|
Answer» Hi, setlocal enabledelayedexpansionThanks contrex! Exactly what I needed.Here is the tested version... some changes were required. Quote
Quote
|
|
| 7328. |
Solve : Close Dos window after program execution? |
|
Answer» I cannot figure out a way to close the dos WINDOW that remains OPEN after i call a webpage. I am using Windows XP sp2. Any help would be great.I think all you have to do is type "exit" at the end of your script |
|
| 7329. |
Solve : batch file run a program based on date - 5 days? |
|
Answer» have been racking my BRAIN trying to FIGURE this out. |
|
| 7330. |
Solve : Help: Wtz de command that replaces FOR command in Win 98?? |
|
Answer» Hello thr, |
|
| 7331. |
Solve : Typed Text Replacement?? |
|
Answer» Hi, i was WONDERING if it's possible to replace the text that is written. If for arguements sake you take this example. |
|
| 7332. |
Solve : shutdown command - How to disable it?? |
|
Answer» I believe you'd have to be administrator to perform a shutdown abort.have you tried looking in your startup folder for a batch file? i remember doing this prank to a friend a long time ago but dont remember EXACTLY how. i think the way to do it is to create a batch file with the shutown COMMAND aFTER a certain number of SECONDS, and put it in the startup folder. if you can quickly open the folder and find it, delete it and that might fix your problem. let me know if this worked or if i was jus talking nonsense
This advice already posted on Sep 19TH |
|
| 7333. |
Solve : Regarding dos command? |
|
Answer» HELLO friends, I just want to KNOW about a COMMAND in DOS: to see the list of currently using ports in the SYSTEM... Thanks & regardsnetstat /? |
|
| 7334. |
Solve : confusing dos problem? |
|
Answer» hey folks hey folksDOS is COMPLETELY different to Command Prompt. Also, are you an Admin on both computers? |
|
| 7335. |
Solve : Newbie - creating a bat file to backup files by creation date? |
|
Answer» Hi folks. Hope you can help me! |
|
| 7336. |
Solve : PIng? |
|
Answer» ANYONE HAVE ANY IDEAS ON PINGINGWhat do you mean do you want to know what it is ? |
|
| 7337. |
Solve : DATE AS PART OF FILE NAME? |
|
Answer» I am building a string for a file name that has the date or part of it as the file name. Like (file1mmdd) where mmdd is the month and day. Most of the files I am dealing with are from the current day so there is no problem BUT some may be yesterdays date. Is there a way to SUBTRACT 1 from the day to build this string? |
|
| 7338. |
Solve : choose random varible? |
|
Answer» ive been trying to get a madlib program to put a random mad lib up. this the expirmental code i have so far |
|
| 7339. |
Solve : Have use complete path for a copy command? |
|
Answer» Hope someone can HELP me. cp c:\reports\2008\***** to m:\reports\finance\2008\*****Uh... what's that supposed to mean?He means that most of the copy - to path is fixed except for the final subfolder. He wants to prompt the user for this. a SET /P followed by an MKDIR should fit the BILL. |
|
| 7340. |
Solve : Is CP/M legal to download?? |
|
Answer» Quote from: contrex on September 11, 2007, 01:56:35 PM what do the rar files contain? The rar i EXTRACTED contain CPM86B144. The rar i didn't extract contains the following. CCARD.DOC CINSTALL.EXE COPYQM.DOC COPYQM.EXE DBCS.DOC ORDER.FRM PLUS.DOC READ.ME VIEWCONF.EXE WHATS.NEW Should i extract it?Quote from: php111 on September 11, 2007, 02:03:00 PM Quote from: contrex on September 11, 2007, 01:56:35 PMwhat do the rar files contain? Of course. A rar file is not going to boot into CP/M, is it? Quote from: contrex on September 11, 2007, 02:08:01 PM Quote from: php111 on September 11, 2007, 02:03:00 PMQuote from: contrex on September 11, 2007, 01:56:35 PMwhat do the rar files contain? Ok i extracted it. What's next?Send contrex the .rar and 50 bucks with a blank CD...Quote from: patio on September 11, 2007, 02:36:39 PM Send contrex the .rar and 50 bucks with a blank CD... No i don't THINK so. Be serious now, how do i make CP/M on a bootable CD?Boot to MS-DOS, install the floppy image HANDLING program COPYQM.EXE, (read COPYQM.DOC) and use it to write the CP/M floppy image file (the .144) file onto a floppy disk. Then boot from that. CP/M is a floppy based OS. It needs to be run from a write enabled floppy. It cannot run from a CD-ROM. If you do not have a floppy drive you cannot run it. Quote from: contrex on September 11, 2007, 03:40:33 PM Boot to MS-DOS, install the floppy image handling program COPYQM.EXE, (read COPYQM.DOC) and use it to write the CP/M floppy image file (the .144) file onto a floppy disk. Then boot from that. CP/M is a floppy based OS. It needs to be run from a write enabled floppy. It cannot run from a CD-ROM. If you do not have a floppy drive you cannot run it. Let me say something about that. MS-DOS is suppose to be run on floppy only. I actually got it to run from CD and installed so i assume CP/M should be the same way or similar. It is the matter of loading in a CP/M boot file which i don't know which one is the boot and i don't know what files to drag over.Quote from: php111 on September 12, 2007, 05:09:51 AM MS-DOS is suppose to be run on floppy only. No it is not! Is this the LEVEL of your knowledge? LOOK here http://www.seasip.demon.co.uk/Cpm/dosplus.html |
|
| 7341. |
Solve : Batch File to Restart Workstation? |
|
Answer» Does anybody know a command line to reboot a workstation but displaying a menu with a "reboot now" option or later? Does anybody know a command line to reboot a workstation but displaying a menu with a "reboot now" option or later?YES it does, you can configure it to shutdown after xxxx seconds. this will allow the user to cancel if need be. If that does not SUIT your needs, just do it in your batch file like this Code: [Select]....installation code here .... print to user: do you want to reboot now.? .... check if user enters Y or y for yes .... if entered "Y" or "y" , use the shutdown command to reboot .... if no do something else ... |
|
| 7342. |
Solve : DOS percent commands %1 ? ?? |
|
Answer» I have a DOS batch file that converts some data |
|
| 7343. |
Solve : merging 1 or more txt files/loggs? |
|
Answer» hello guys.
In this CONTEXT what does 'merges' mean??? Do you mean to concatenate files sorry .. eh scratch this topic.. i was to tired this morning to google first and ASK later anyway this ARTICLE solved it. http://www.rondebruin.nl/csv.htm |
|
| 7344. |
Solve : Regarding .BAT file? |
|
Answer» I have an Executable file in a DIRECTORY which is given below |
|
| 7345. |
Solve : HELP error (cannot be performed on a file with a user-mapped section open. )? |
|
Answer» I am running Win xp PRO. I am trying to copy a blank index.dat file into my tempory internet \content.ie5 folder. I have the following line in my batch file.(xcopy /r /y /k c:\batch\blanki~1\index.dat C:\DOCUME~1\WILLIA~1\LOCALS~1\tempor~1\content.ie5) I get the error message (file creation error - The requested operation cannot be performed on a file with a user-mapped section open. am i missing a switch or an additional command. I thought I may be GETTING the error message because i had windows explorer open, but sent a shortcut to the batch file to the desktop. that didn't help either. is there any way AROUND this without logging on as another user or administrator? any help would be greatly appreciated... WEW Why not just delete the existing index.dat and let Windows create a new one? |
|
| 7346. |
Solve : Script to Add/Remove DNS & WINS? |
|
Answer» Hi everyone, |
|
| 7347. |
Solve : stuck in dos no graphics? |
|
Answer» I loaded the wrong Intel video driver. Normal screen is two bands of color. That fixed it! Went back two versions to Saturday and have graphics again. Thanks 2k! You're no dummy. We've been TELLING him that for quite some time... |
|
| 7348. |
Solve : installing win 98 se? |
|
Answer» i recently bought an old gateway pc with win 98 se on it. my HARD drive crashed and i found the restore cd inside the tower but it is a GHOST restore cd in ms-dos. i FIGURED out how to boot to ms-dos,but how do i get the cd to run and reinstall windows and my drivers?What files are on the CD? |
|
| 7349. |
Solve : CHDIR/CD Command no longer works in DOS? |
|
Answer» Hi, |
|
| 7350. |
Solve : Deleting Old files if new files exists? |
|
Answer» Hi GUYS, please help me to write this code.... its very urgent 1. EXACTLY why is it "very urgent"? Boss? Teacher? 2. In the other thread you wrote Quote Thank you for your hard work and helping me.. Its working perfect So why not use that code? hi guys, Finally i got the solution for this. Here is the code.... echo off set log=%temp%\filelog.log forfiles /p c:\test /s /m *.* /d 0 /c " cmd /c echo @file >"%log%" " if exist "%log%" ( forfiles /p c:\test /s /m *.* /d -1 /c "cmd /c del @file" ) del %temp%\filelog.log This code is used to keep the latest files and delete the old files (on date basis). Thanks for your suggestions.. regards, chinna |
|