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.
| 1501. |
Solve : Boot CD DOS vs. DOS in Windows? |
|
Answer» Why do .bat files I have written work in Windows but not in DOS when I have booted from a boot CD? |
|
| 1502. |
Solve : press to bypass LAN check? |
|
Answer» Every time I reboot, I get this cheerful black screen that tells me to Press to bypass LAN check. What can I do to get rid of this? |
|
| 1503. |
Solve : To call a Batch file on remote system? |
|
Answer» Hi, I have a query regarding calling the batch file in the remote system. |
|
| 1504. |
Solve : Editing a file [automatically] through batch file?? |
|
Answer» This is probably a very very noob question It would be possible to do some kind of word-processing / text-editing type things to a file fairly simply, such as search & replace, change case, deletion, insertion, etc. How would one go about deleting (not ignoring) the first line of a text file using DOS?Using the "skip" setting in the FOR command, copy the file to another temp one, skipping the first line. Then delete the original file, and rename the temp file with the original file name. Here's what I got so far...and it's not working...Not sure what I'm doin wrong: For /F "skip=1" %%x in ("i:\shared_retention\ccbatch\ccbatch.txt") do copy %%x "i:\shared_retention\ccbatch\ccbatch2.txt" am I WAY off? Quote from: dvnmaya on March 03, 2008, 02:56:39 PM Here's what I got so far...and it's not working...Not sure what I'm doin wrong: Not far off really. You need ECHO, not COPY. The lines starting REM are REMarks and do not affect the operation of the batch file and can be removed if you want, as can the blank lines. I have PLACED the SOURCE and destination file names into variables to make the code a bit clearer but you can code them literally if you want, of course This should work... Code: [Select] set file1="i:\shared_retention\ccbatch\ccbatch.txt" set file2="i:\shared_retention\ccbatch\ccbatch2.txt" REM if the target file already exists, delete it if exist %file2% del %file2% REM Now the >> redirection will create the file the first time it is used REM to echo a line and append each line subsequently For /F "skip=1" %%x in (%file1%) do echo %%x >> %file2% |
|
| 1505. |
Solve : Batch File Execution based on Modified Date? |
|
Answer» HI there, I am trying to create a batch file that will only run if a certain file has been modified. I was PLANNING on using something like windows task scheduler to execute that batch file every hour or so, but WOULD like the batch file to end if a certain file has not been modified based on current date. Any ideas or suggestions would be great. Thanks,What have you got so far CODE wise? What do you mean "modified"? If the last-modified date/time changes? The file date stamp is the the time / date of modification, and the %%~t FOR variable modifier will read it. You could set the archive flag .... when it is updated it will be reset, you can then check this in your batch - no mucking around with date testing This is how backup routines determine if a file needs archiving or not Graham |
|
| 1506. |
Solve : Strip Trailing spaces? |
|
Answer» I've been lurking here for a while and have picked up some great tips, but I'm stuck on something and hoped someone could help. Is it possible to have a For statement that will take the first 16 characters of each line and then pipe it to another file?Yes. The easiest way I can think of would be something like: Code: [Select]echo off setlocal enabledelayedexpansion for /f "tokens=*" %%a in (sample1.txt) do ( set line=%%a echo !line:~0,16!>>sample2.txt )This ASSUMES the original sampling file is sample1.txt and the file you get back is to be sample2.txt. You will also need to clear out the contents of sample2.txt between runs if you run multiple times in the same directory as it will keep appending to the end. Or if you really wanted to shorten the FOR into one line (you still need the enabledelayedexpansion), you can try: Code: [Select]setlocal enabledelayedexpansion for /f "tokens=*" %%a in (sample1.txt) do (set line=%%a&echo !line:~0,16!>>sample2.txt) |
|
| 1507. |
Solve : Using Copy in Windows XP to back up Whole Hard Drive? |
|
Answer» What is the best way I can copy my whole Hard Drive using a copy command or XCOPY command to an external USB Hard Drive . I have Windows XP , 2nd version. And what is the command to do that?Why would you want to copy your ENTIRE hard drive like that?I was hoping to make it easier so I wouldn't need a third-party software backip my whole hard drive. So if my Internal HD crashes all I need to do is copy the whole hard drive from my external USB hard drive, back to my Internal HD.This strategy is doomed to FAILURE...Windows isn't designed to do this. |
|
| 1508. |
Solve : dir piped to move command failure [solved]? |
|
Answer» A command window in WinXP Pro given the instructions: for the same command directly in a command prompt, change the %%a to just %aThanks for the reply. What are the percent signs telling the program to do? Also, any idea what the command I used did with the directory that vanished? Is it forever gone? Quote from: dbam on MARCH 04, 2008, 10:24:23 PM What are the percent signs telling the program to do? To CREATE and use variables. Quote A command window in WinXP Pro given the instructions: Code: [Select]dir D:\*somestring* /S | move C:\somedirectory Quote What would happen to the files found by dir in the D drive? Alas, it moved "C:\somedirectory into my home directory lock, stock and barrel, complete with the *somestring* files that it found. My guess is that it didn't know where else to put it since I didn't specify. Thanks Gary and Dias for the pointers and good help. |
|
| 1509. |
Solve : COM connection command? |
|
Answer» i know there is a command to ADJUST ur COM settings(MODE command) but i tried doing the "copy con(keyboard) com1" this lets me copy watever i typed on the keboard to the COM PORT i specify but i want to create a batch PROG SIMILAR to WinChat a batch prog that is a chatroom that to users can send and recieve typed words either by using there built in modem(over their phone line) or a direct connection(a connection using a serial cable to connect the two comps.) but how do i create a batch file that can send and recieve commands simultaneously then display them? |
|
| 1510. |
Solve : run script in the batch file? |
|
Answer» Hi, |
|
| 1511. |
Solve : Similarities to CTTY? |
|
Answer» Does anyone know if there is something similar to CTTY for Win XP? |
|
| 1512. |
Solve : User prompt and folders...? |
|
Answer» I have a structure of folders that follows the below example: |
|
| 1513. |
Solve : BAS, Trying to run game on C64, please - need help / file? |
|
Answer» Someone suggested to me, that they send me a BAS command file |
|
| 1514. |
Solve : For Dias de verano: Can I extract a portion of a file name?? |
|
Answer» Yesterday you came to my rescue and showed me how to extract the DATE and convert it into a different format. Today I have a similar file re-naming issue that I'm hoping you can help me with. the file name format will always be the same, a four (4) character file name preceding the creation date (which will always be the previous business day) followed by the file extension, with the three parts being separated by two periods, as in name.yyyymmdd.extension. Have you worked out how you are going to isolate the filename that is "on top"? Is the extension always the same? Never mind, the extension doesn't matter. All you need to do is extract the 8 characters starting at the 6th position from the start. To slice a string variable... You need a percent sign, the variable name, a colon ( : ) and a tilde ( ~ ). a number, a comma, another number, and a final percent sign. if %string% is the full string %string:~a,b% is the substring which is b characters long starting at position a. (Start from zero) so if %string% is abcd.yyyymmdd %string:~0,4% will produce abcd %string:~5,4% will produce yyyy %string:~5,8% will produce yyyymmdd Considering everything I tried yesterday before asking for help, I'm feeling kind of foolish at how I missed the solution entirely. Here is the syntax that isolates the filename, which I found on this forum a few weeks ago... FOR /F %%i IN ('dir /b /a-d /o-d') DO ( set firstfile=%%i ) ...and ADDING %firstfile:~5,8% after, per your directions, yields the characters I need to properly name my file. Thanks again!! |
|
| 1515. |
Solve : Simple Batch File Help.? |
|
Answer» I want to load one program and have it wait for a confirmation to load the next program. i know absolutely nothing about dos at all I want to load one program and have it wait for a confirmation to load the next program. i know absolutely nothing about dos at all Did you mean you want the batch file to start pbsetup.exe and get the user to do some stuff and exit from that program (close it down) and then, and only then, start up iw3mp.exe? If so you want to something like this start /wait "" "C:\pbsetup.exe" REM This line and the next 4 lines are optional echo Finished PBSETUP echo Ready to start IW3MP echo Press a key when you are ready PAUSE>nul start /wait "" "E:\COD4\iw3mp.exe" echo All finished that kinda WORKED. its runs the first exe. then when it tries to run the second exe, my game errors out when i try and launch it. is there a possibility that a SHORTCUT can be launched instead of the iw3mp.exe ?try it and find out.......i dont know anything about dos.... Quote from: zviper on March 07, 2008, 11:17:44 AM i dont know anything about dos.... WELL, it's up to you to change that. I'm asking for some help to make a simple batch file, the least you could do is point me to the right infoYou got the right info. A little suggestion: lose the attitude. If the batch file is that "simple", how come you haven't written it yourself already? |
|
| 1516. |
Solve : Inserting today's date in a filename via a batch file? |
|
Answer» I've created a simple batch file that copies a DOZEN small files from multiple directories into a single directory and then compresses them into a zip file. I have to do this each day, then ftp the zip file to a co-worker in another facility. Wed 03/05/2008 OK so it's US date format Quote Is there a way, within a batch file, to extract the current date, convert it to yyyymmdd format, and then rename zipfile.zip to zipfileyyyymmdd.zip? set today=%date:~10,4%%date:~7,2%%date:~4,2% ren zipfile.zip zipfile%today%.zip I plugged this into my existing batch file, and it worked like a charm. Thank you so much for the assist!! Quote from: Dias de verano on March 05, 2008, 11:55:26 AM set today=%date:~10,4%%date:~7,2%%date:~4,2% Just noticed this morning that the above syntax re-formats the date as YYYYDDMM as opposed to yyyymmdd. Simple fix, though. Thanks again! You're right; I guess I missed it because I'm used to the European dd-mm-yyyy format. But you overcame that. |
|
| 1517. |
Solve : Problem w/ creating alias? |
|
Answer» When I try to create and ALIAS I get the error"is not recognized as an internal or external command, operable program or batch file. " What is the PROPER way to create as alias in CMD?What do you mean by 'alias' ? |
|
| 1518. |
Solve : dir command echo containing folder? |
|
Answer» Is there a way to use the MS-DOS dir command to echo back the containing folder? |
|
| 1519. |
Solve : run batch file on start up? |
|
Answer» Hi, I'm semi NEW to Ms-Mos and need a little help. I am wondering if it is possible to make a batch file that will make the computer run a seperate batch file every time the computer starts up? Let's pretend the first batch file's name is "batch1.bat" and the second batch FILES name is "batch2.bat" did you mean real MS-DOS or WINDOWS command prompt? if Windows, which version? |
|
| 1520. |
Solve : Batch files help!? |
|
Answer» I need some help with a batch file I need to write, I am TRYING to do the following. I need to find all the files in location A with a file size of 0KB and replace the text in those files with an ERROR message saying something like "error when saving", and to add a little more complexity I need to skip over .red files. Thanks for any helpWhat do you have so far?Good question, Gurugary. |
|
| 1521. |
Solve : Check Date Modified? |
|
Answer» Hi all, |
|
| 1522. |
Solve : Shortcut.exe? |
|
Answer» I was woundering how to create a SHORTCUT using a DOS batch COMMAND line and I could'nt find the ANSWER on CH... |
|
| 1523. |
Solve : How do I fdisk?? |
|
Answer» I was wondering I'm new to this site I'm trying to fdisk my computer is there some step by step info to do this ALSO my floppy drive dont work do I need the floppy to do the fdisking? I have windows xp right now after I do the fdisk can I just install my windows xp CD will it load? From Our Archives... |
|
| 1524. |
Solve : Printing from DOS to Tray 2?? |
|
Answer» HELLO all. I have been scanning thru the posts and have not seen any reference to Printing in DOS to tray 2 yet. Is it possible? KenTray 2 on what kind of printer? My (very) limited experience suggests that selecting a tray is done at the PRINT driver LEVEL. Even in the old days of using DOS, I don't remember a way to point a print job to a particular tray output. This is, by no means, the last word on the subject!! If the printer supports PCL5 then commands can be sent to select the tray. Many HP printers support this. Sorry, it is an HP4000 Dias de verano, can you supply the DOS commands to do this please? I have never seen anything like this. KenYes, this is interesting...They are called 'escape sequences'. This used to be the way printers were controlled. Dot matrix and laser printers especially used printer control languages such as ESC-P (Epson) and various flavours of PCL (HP and OTHERS). The HP4000 can use PCL5e I believe. Check a PCL5 reference manual for details of how to control the printer using Escape Sequences. There are PCL5 drivers on the HP CDROM that came with the printer. If you do not have it, contact HP. Escape Sequences for the HP4000 are here. I'd completely forgotten about escape sequences -- completely. Let us know, KenL, how this works out for you.I looked up the escape sequences and this is not going to work for me. I would have to embed this into every report I produce and thus would require my client to print from tray 2 for every printer/report. I need something I can trigger by the print statement or by setting up a separate QUEUE on the server which defaults to the second tray. As of right now I have told my client to purchase another printer. I still want to figure this out. I have also looked at using START/MIN NOTEPAD /P filename.txt but that messes with the page length so my headings are not at the top of the page. I have also looked into creating a PDF file. One I tried from SourceForge.net required installing all kinds of other software (python, etc) and didn't work so I gave up. |
|
| 1525. |
Solve : Help.....Anyone? |
|
Answer» I have a report which is on my c: drive and I want to create a batch file which will take me to the LAST page of this report which contains the phrase Totals and display it.Not really ENOUGH details, but you might use the find command: |
|
| 1526. |
Solve : MS DOS 6.8? |
|
Answer» Dear All, |
|
| 1527. |
Solve : if exit..? |
|
Answer» how do i make it so that if the ms-dos is exit that it will then start a file or a code?
You can't do this. (EXPAND a variable to a label name & goto it) ok...now try this Code: [Select]set /a var=%random%%%4 if %var% equ 0 set one=I like it cause of that to. if %var% equ 1 set one=eww, are you shurr? if %var% equ 2 set one=Wow, never thought of that. if %var% equ 3 set one=Are you shurr? echo %one% pause label %one% goto oneFrom testing, I discovered you can in fact expand a label name go to it: Code: [Select]set one=two if errorlevel 0 goto %one% goto :eof :two echo %one% If you leave echo on you can see the expansion in real time. You cannot however expand a variable as part of a label: Code: [Select]set one=two if errorlevel 0 goto %one% goto :eof :%one% echo %one% Quote from: macdad- on March 20, 2008, 11:59:59 AM label %one% What does this line do? PS Can we spell "sure" properly please? Quote from: Sidewinder on March 20, 2008, 12:49:11 PM From testing, I discovered you can in fact expand a label name go to it: So you can, I now see. I was always taught that self-modifying code is a bad idea, however. Quote You cannot however expand a variable as part of a label: I think that was what I was thinking of. Quote So you can, I now see. I was always taught that self-modifying code is a bad idea, however. Amen Debugging such a beast can be a nightmare. Just because you can do something is no reason.... I'm still trying to figure out what the OP meant by if the ms-dos is exit And somebody else needs to look up the label command... Quote the word 'sure' is spelt thus. Thus SPAKE Zarathrustra Quote from: Aegis on March 20, 2008, 02:48:16 PM Quotethe word 'sure' is spelt thus. Thus Spoke Z a r a t h u s t r a (German: Also sprach Zarathustra, sometimes translated Thus Spake Zarathustra), subtitled A Book for All and None (Ein Buch für Alle und Keinen), is a work by German philosopher Friedrich Nietzsche, COMPOSED in four parts between 1883 and 1885. It famously declares that "God is dead", elaborates Nietzsche's conception of the will to power, and serves as an introduction to his doctrine of eternal return. Described by Nietzsche himself as "the deepest ever written", the book is a dense and esoteric treatise on philosophy and morality, featuring as protagonist a fictionalized Zarathustra. The text encompasses passages of poetry and song, often mocking Judaeo-Christian morality and tradition. well what i guess what im trina do is something like this .,.its not correct because i dont know what to do if %var% equ 0 set one=I like it cause of that to. if %var% equ 1 set one=eww, are you sure? if %var% equ 2 set one=Wow, never thought of that. if %var% equ 3 set one=Are you sure? echo %one% if if %var% equ 1 set one=eww, are you sure? goto h :h why do you think this? set /p choice= so like i want it that if the choice of if %var% equ 1 set one=eww, are you shurr? is picked i want that one to go to h and just that one. how do i do that if %var% equ 0 set one=I like it cause of that to. if %var% equ 1 set one=eww, are you shurr? if %var% equ 2 set one=Wow, never thought of that. if %var% equ 3 set one=Are you shurr? echo %one% if if %var% equ 1 set one=eww, are you shurr? & goto h goto skip :h why do you think this? set /p choice= :skip correct |
|
| 1528. |
Solve : make the .bat save it's self? |
|
Answer» sorry I'm a bit of a newbie when it comes to dos but Ive made a simple program to run a few things i want the .bat to save it's self to a specified location so it can be called is this possible THANK you. sorry im not clear. and i dont need to tell my friend where to save it. maybe i should re phrase my question.Ok here goes, i want to make the .bat file rune every time the computer is started how do i do that? Not really; now we know you want to make a batch file which, when run, without the computer owner doing anything, saves itself to somewhere that it gets run every time the computer starts. You could have a perfectly harmless reason for wanting to do this, you could have a very bad reason. We don't know. I don't feel that it is a good idea to place details of how to do that on a forum like this. i can asure you it is for a good reason i just want to start a few PROGRAMS such as fps creator on STARTUP and i want them to run every time. if you are not willing to tell me how to do this in public can you p.m me thank youIf thats all you want to do, why not just drag a few shortcuts to the startup folder ? GrahamThere gpl told you i want the programs to be run automaticly on startupAnd they will do so if you follow gpl's advice... Quote from: kingkingbill on March 10, 2008, 12:36:03 PM i can asure you it is for a good reason i just want to start a few programs such as fps creator on startup and i want them to run every time. if you are not willing to tell me how to do this in public can you p.m me thank you Oh right like I was born yesterday... i seriosly do, it would help me a lot and save me time because i dont want have to open darkbasic,fpscreato,milkshape,3dsmax,notpad and other manulallyDarned if I can find it but this topic has done the rounds before tho' not from KKB. Turned out that the .bat was to be installed on other computers to cause havoc when remotely called. Nobody would advise then either.I agree with most on this. I cant see any valid reason why you'd want it to save it's self on a remote machine. If this is just to help a mate out, make the batch on your machine, save it as a a txt file and email it to him, get him to change the file extention back to .bat and put in the startup folder. Now I think of it, this could be done remotely without the remote users knowage but I'm not going to post that here...... |
|
| 1529. |
Solve : About runing? |
|
Answer» Hi all , I typed in the run |
|
| 1530. |
Solve : mode300 opposite? |
|
Answer» is there a command I can use to make the WINDOW NORMAL SIZE again after it is set to mode300? |
|
| 1531. |
Solve : Look at part of a variable...? |
|
Answer» I've got the following CODE: |
|
| 1532. |
Solve : renamiing multiple files? |
|
Answer» I have about 1000 .bmp files that all have the prefix 'Copy of' in front of them. |
|
| 1533. |
Solve : Strip the READ ONLY Attribute from mutiple files..??? |
|
Answer» I KNOW how to STRIP the READ only attribute from a single file, but how would i strip the read only attribute from multiple file types in multiple sub-folders that are in one single folder..??Try: |
|
| 1534. |
Solve : hard drive password / HELP? |
|
Answer» I have a laptop that has a hard drive password, but don't what it is.. when the computer boots , it goes to a white screen asking for hard drive password.. how can I get PASS this password.. can someone help me!!!!!!!!!!!!!!!!!!!!!!!!!!!! pleaseYou'll need to get the password from the previous owner of the laptop...is there any way to bypass the password? I bought it at a yard sale.....It may be possible to get past the password. (It depends on several things.) hard drive password 6. What is the exact wording of the error message? There is no backdoor METHOD for hard drive passwords. If you got it at a yard sale chances are your cash outlay was not that high...i'd start looking at replacement hard drives or contact a repair facility.Why do people buy these used laptops? The one described at the start of this thread would not be much use even as a gift. One possible problem with used laptops bought from an untraceable stranger in a non-commercial setting is that he or she may or may not be the legal owner of the machine. Even if they are, they may be less than totally open about its condition. (!) I would certainly want to see it running and would also want to see BIOS and hard drive passwords shown to me and also used and verified in front of me before I parted with any cash. If not, I would consider it a scrap machine to use for parts only, and would value it according to that, and also consider its age and spec. (I wouldn't buy a used laptop like this anyway.) The legal owner should be aware of these issues and ready to address them for you. Otherwise all sorts of problems can arise. Not much use to the OP I guess, but worth bearing in mind. The last person who asked me to unlock his newly "bought" used laptop (I didn't) is now in jail. You can get some hard drives unlocked by PAYING a fee, $100 is a typical sum, to a data recovery service. The following is on a website I found. Some laptops provide a utility to lock a hard disk with a password. These passwords are not the same as BIOS passwords. Moving a locked hard disk to another machine will not unlock it, since the hard disk password is stored in the hard disk firmware and moves with the hard disk. Also, adding a new (unlocked) hard disk to a locked machine may cause the new hard disk to become locked. Also, note that hard disk lock passwords cannot be removed by reformatting the disk, fdisk or any other software procedure (since the disk will not allow any reads or writes to the disk, it cannot be reformatted.) You can test to determine if your hard disk is locked by attempting to access it in another laptop. GREAT additional info there Dias.... I was too tired to swim thru my notes. |
|
| 1535. |
Solve : im stuck and need a solution :(? |
|
Answer» im about to MAKE a proxy pinger i want it to read from a text document and ping each line: The loop should look like this thank you but the port numbers are still following... the port numbers have to be TAKEN off before able to be pinged.Sorry I LEFT out a colon in the delims section Code: [Select]echo off for /f "tokens=1,2,3,4 delims=.:" %%a in (proxy.txt) do ( ping %%a.%%b.%%c.%%d -n 3 ) |
|
| 1536. |
Solve : Insert a blank line in a text file using echo command?? |
|
Answer» Hey, I'm trying to create a batch file to INSERT text into a text file using the echo command. |
|
| 1537. |
Solve : For loop command and user input...? |
|
Answer» Is there anyway of using the For-do loop command to continually loop to a character is inputed from the keyboard, and based on that input script to do other commands? BASICALLY, Set /p FUNCTION allows me to input something, but then I'm needed to hit AFTERWARDS and I want to just hit the character and move on. |
|
| 1538. |
Solve : change xp user account type by only using cmd? |
|
Answer» is there any way from an admin ACCOUNT on an xp pro pc to only use cmd to change a users account type from limited to another admin when you know the PASSWORD for that limited user account. |
|
| 1539. |
Solve : I'm stumpted.. why isn't this working?? |
|
Answer» Here's my code below. I've setup the batch file to read the directories in a folder, and then list them in ALPHABETICAL order with a number beside it so the user can then choose which folder they want to use. The problem is that the counter (which numbers the folders) isn't progressing, and I can't figure out why! Is there something in the code I'm missing, or perhaps a global setting/variable that I don't have that I need? See red items :ListFolders SetLocal enabledelayedexpansion Set Input=0 Set Count=1 Set Folder=%1 Echo Choose a Folder from Below: For /F %%a in ('dir /b /o /a:d C:\MainFolder\%Folder%\*') Do ( Echo !Count! == %%a Set /a Count=!Count!+1 ) Set /P Input= Selection:Just out of CURIOSITY, what does that line do exactly? Quote from: Feidom on March 21, 2008, 03:35:29 PM Just out of curiosity, what does that line do exactly? Normally, in a WINDOWS NT family batch file, ordinary variables (the ones with percent signs like this: %variable%) are expanded just once, at run time. This includes variables inside loops. This means that a variable cannot be created or its value changed in a loop or a multiline IF STRUCTURE. To make that possible, Windows 2000 introduced a new feature - delayed expansion. To use this you need to do the following... 1. Enable delayed expansion by either (a) start a command shell using CMD /V:ON -- or -- (b) include the line setlocal enabledelayedexpansion in a batch file before using delayed expansion -- AND -- 2. Use exclamation marks (!) instead of percent signs (%) around variables as in my suggested code above. Type cmd /? at the prompt and/or Google for "delayed expansion" for more information, and very possibly a better explanation than I have given here. |
|
| 1540. |
Solve : Backing up files DOS based CNC machine? |
|
Answer» At work we have CNC milling machines from the late 80’s. The machines OS runs on a version of DOS. What I need is some sort of utility for dos that I can boot form the floppy drive (or copy to the c drive) that will allow me to backup the data and prompt for a second, and third disk. Versions of DOS came with backup and restore utilities. Have you checked them out? If your DOS version is Microsoft, the backup utility would be named MSBACKUP. The root directory has a limit to the number of files it can store -- are you able to backup to a folder on the floppy (A:\Backup for example) ? There is not the same limit there Or grab a dos based zip program (pkzip / pkunzip) Graham Quote from: gpl on March 25, 2008, 08:46:36 AM ... Side note for the op: It's not as easy to find as it used to be. Original self-expanding archive name is pkz204g.exe . Easier to find if searching for that. Here are some places to find it: http://www.computercraft.com/docs/pkz204g.shtml http://www.filewatcher.com/m/pkz204g.exe.202574.0.0.html Maybe take a look at something like this? http://usbflashstore.com/smarsecdigfl.html Quote from: Sidewinder on March 25, 2008, 08:15:12 AM
Thanks for the response,after looking in the DOS directory on the C: drive there is msbackup.exe I will try this later when the machine is not in use. To everyone else that answered, thank you all very much. I will look into all of the options and see what works best. I'm trying to make it easy for myself and the the other guys to back up regularly. Hi all , I would you recommend you to use Norton Ghost and clone that old hard disk to new fresh one . I hope that this will help you .Thats a good suggestion but a company called EMI INC supplies a Disk on Module (DOM). It's a solid state disk drive that has the machine OS pre-installed. All I have to do is make sue that the programs we use for production are backed up. The machines are picky about things like the HDD SIZE and cylinder heads so the DOM is awesome for when one of our HDD goes out. It's hard to be leave that some of theses hard drives on our machines are 15+ yrs old. I tried the msbackup seems like that will work. I also looked into pkzip, it looks like this will work as well. I also tried making a directory on the floppy and copying the files to that directory and that worked too. Thanks agian everyone for the help. |
|
| 1541. |
Solve : Does anyone have a DOS change script?? |
|
Answer» Hello all, well I went and did it...I "UPGRADED" to Windows XP x64...and my trusty CHANGE.EXE program from Bill Guthrie (http://users.erols.com/waynesof/bruce.htm) no longer WORKS. Says it is from a different operating system. I have sent Bruce an email, but in the mean time; |
|
| 1542. |
Solve : Script Run when process ends? |
|
Answer» OK I don't know if this is possible but I am looking to have a script that monitors a process so that when it ends it will shut the machine down. How would I create this and is it even possible?What KIND of process? |
|
| 1543. |
Solve : Need to pull info from a large number of text files in a directory? |
|
Answer» I need to pull info from a large number of textfiles in a directory and aggregate this to another textfile. The info needed is two lines (line 1 and line 9) in the textfile, and these lines are consistently lines 9 and 16 across all the textfiles. The info needed is two lines (line 1 and line 9) in the textfile, Then you said Quote these lines are consistently lines 9 and 16 across all the textfiles. Which is it? Dias, i think he wants to take the info from lines 1 and 9 in the text files then copy the info, and then paste the info to lines 9 and 16 on one txt file.dec27 i will find how to do that but in the mean while i need to know what operating sys u ar using so i can get the correct code. Quote from: macdad- on March 18, 2008, 05:25:03 PM Dias, i think he wants to take the info from lines 1 and 9 in the text files then copy the info, and then paste the info to lines 9 and 16 on one txt file. That's a very odd requirement indeed, if that is so. try this. Code: [Select] echo off cls md admin copy U:\abailey\NetLogon.txt \admin copy U:\ablay\NetLogon.txt \admin copy U:\abreen\NetLogon.txt \admin echo Login Information Archived pause exit i tried doing wat u said by copying specific lines but it cant be done automaticly. the code above will copy the "NetLogon" files from each of the folders to a folder that will be created automaticly called "admin". make sure u copy the code above to notepad and save it as a bat file. hope this works for u. Quote from: macdad- on March 19, 2008, 11:20:22 AM i tried doing wat u said by copying specific lines but it cant be done automaticly. Yes it can. how? the only way i can think of copying specific lines is by using edlin but u can only do that manually.Set a counter variable equal to 1 using set /a Read the text file line by line in a FOR loop, adding 1 to the variable each time with set /a If the variable value is equal to the line number number desired, do something with that line. Or you can use SED but that is not part of Windows so some PEOPLE MIGHT think it was cheating. I am not trying to hijack this or anything but I am having the same problem but I am looking at only trying to find a certain lien that could be anywhere in the text file but I am looking through at this time about 4,000 files. I am not ever sure where to start on the coding of this. Is there a way to do this since It is a bit different than what the original poster is trying to do.This is how you get a selected line from a text file without using SED Code: [Select] echo off setlocal enabledelayedexpansion REM create test file echo 1 Line one > test.txt echo 2 Line two >> test.txt echo 3 Line three >> test.txt echo 4 Line four >> test.txt echo 5 Line five >> test.txt echo 6 Line six >> test.txt echo 7 Line seven >> test.txt echo 8 Line eight >> test.txt echo 9 Line NINE >> test.txt echo 10 Line ten >> test.txt echo 11 Line eleven >> test.txt REM show test file echo. echo Here is the test file: echo. type test.txt echo. set /p chosenline=Choose a line to display? echo. set /a line=1 for /f "delims==" %%L in (test.txt) do ( if !line!==%chosenline% echo %%L set /a line=!line!+1 ) echo. Quote from: guardian on March 19, 2008, 12:06:01 PM I am not trying to hijack this or anything but I am having the same problem but I am looking at only trying to find a certain lien that could be anywhere in the text file but I am looking through at this time about 4,000 files. I am not ever sure where to start on the coding of this. Is there a way to do this since It is a bit different than what the original poster is trying to do. Describe some features of the line you are looking for but wont it be easier to just copy the files. Quote but wont it be easier to just copy the files. If you just want one line out of each file, why clutter up your disk space uselessly copying hundreds or thousands of files? When you still have to look through them to find the lines that you want? Quote from: dec27 on March 18, 2008, 10:55:09 AM I need to pull info from a large number of textfiles in a directory and aggregate this to another textfile. The info needed is two lines (line 1 and line 9) in the textfile, and these lines are consistently lines 9 and 16 across all the textfiles.if you can download and use gawk from here: Code: [Select]#save the below script as script.awk # assumes you only want to get line 1 and 5 { i=1 while( ( getline line < $0 ) > 0 ) { if (i==1 || i==5) print line > "newfile" i+=1 } } output: Code: [Select]C:\test>dir /B /S NetLogon.txt | gawk -f script.awk |
|
| 1544. |
Solve : Block the port? |
|
Answer» Hi all,I was wonder , How I can block the computer port? Hi all,I was wonder , How I can block the computer port? you know that port 80 is the port that you get your internet connection thourgh which is probably your ETHERNET port.I i know .I'm STILL no clear on why you want to block outbound access to port 80... but to each his own. Actually on closer inspection you can't use the Windows Firewall to block port 80 because it offers no outbound protection. You will need to install a firewall then. Comodo is my personal choice. http://www.personalfirewall.comodo.com/download_firewall.html You should know though that simply blocking port 80 will is not an effective way to block access to web sites. Not all websites use port 80 and someone could still bypass the block by using a proxy on ANOTHER port. You can make the block more effective by blocking port 443 (HTTPS) and port 8080 (alternate http port) but the above still apply. I think what he wants is to know how to unblock the port because he can't get on the web. He may think that the port is already blocked and he is trying to unblock it. that makes since since some firewalls have a "Lock Internet Access" Feature on them, but if he's using the Win XP built-in firewall then he'll have to adjust the settings on it to Unlock his internet access.Thanks dude ,i will try it as soon I install it .I use a program called Internet Lock to block my ports. However, it costs money. You can search on google "Block Internet Freeware" or something for free programs which can block and unblock (password protect) your internet access. THere are many results. Of course, make sure you download licensed freewares. Cracked Software is not encouraged. |
|
| 1545. |
Solve : Removing a directory(Folder) if it exists? |
|
Answer» Hello again, I am trying to remove a folder if it exists and I am getting an error. |
|
| 1546. |
Solve : Reading the output file from Command Prompt window? |
|
Answer» RE: Using Dec-C++ COMPILER on Windows XP |
|
| 1547. |
Solve : How to check a file status (open or closed) from batch command? |
|
Answer» I need to check for a file (.dat or .TXT) status and introduce delay if it is open. How to check file status (open or closed) from batch command. |
|
| 1548. |
Solve : Advance For Loop? |
|
Answer» I am WORKING on a script to copy files to remote systems. I am stuck where I check a text file to see if this system has had the folder copied or not. If it has, then I need to skip the IF statements and just advance the loop to check for the next system....I have put in italics the portion I am having problems with... |
|
| 1549. |
Solve : Accented character de batch files? |
|
Answer» I'm using a Windows XP SP2 |
|
| 1550. |
Solve : Strike Commander in DOS? |
|
Answer» hi |
|