Explore topic-wise InterviewSolutions in .

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.

2351.

Solve : Can I replace certain text string in file??

Answer»

Hello,

After I use the FIND COMMAND to find the certain text string in .TXT FILE, is there ANYWAY to replace or modify the text string?

THANK you in advance for your help.

Mac

2352.

Solve : help please with MS DOS?

Answer»

When i try a smart RESTORE i get this message

C:\Documents and Settings\All Users\Start Menu\Programs\Packard Bell Support\Smart restore.lnk
C:\WINDOWS\System32\autoexec.nt. The system file is not suitable for RUNNING MS-DOS and Microsoft application. Choose 'Close' to terminate the application.


can any1 HELP me with this pleaseDo you mean this>>http://support.microsoft.com/default.aspx?scid=kb;en-us;324767 Hi...& HAPPY New Yrs.
I don't really know how it happen...but Ms-Dos
has taken over my folders, files...and I get it on the
Autoexec...folder.....Everytime I try to open up
a Folder, file....I get this Ms-Dos plague on it.
Like the file returns in a Dos world....I just wish to reurn back to an ORIGINAL setting...Plain English. I also get some of these file encrypted...in an "Hieroglyphic"
version...Please help.... Jesus what o/s?

2353.

Solve : How to test for empty file via script?

Answer»

How can I test via a DOS BATCH script if a file is EMPTY (zero bytes)?

THANKS!

2354.

Solve : Help-what does "2>&1" mean??

Answer»

Hey,I am now working on a wince project. I OFTEN encounter "2>&1" in batch file.
It often looks like this:
@REM // cleanup error log file and SET local env
if not "%___BATCHMODE%"=="" goto endif_25
setlocal
DEL %_WINCEROOT%\build.err > nul 2>&1
del %_WINCEROOT%\build.log > nul 2>&1
del %_WINCEROOT%\build.wrn > nul 2>&1
:endif_25

I know:
2>:redirects error output of a program to a file.
&:separates TWO or more COMMANDS executed sequentially.

But I do not know what does "2>&1" mean?
Please help!
Thanks in advance.Looks like an instruction in OS/2 and NT to route standard output & command error to a file (in this case the file NUL) - see here

http://www.robvanderwoude.com/index.html

Sorry I can't be of more help but the website is pretty clear.

Good luck

2355.

Solve : DOS ??

Answer»

I checked numerous of SITES, but I can not find the ANSWER. I checked all the sites that people have recommended in the last month.
Here it is
I need to copy certain files based on their date created.
Is there a way to specific to do that?
Thanks to allHave you checked www.microsoft.com ?

[glb]Flame[/glb]First a coupla queries.

(1) What Dos version are you using?
(2) Is this Dos in a Win environment (Win 98 etc) If so which Win version?
(3) If you wish to copy a FILE created on date will there be other files also created on that date which you do NOT want to copy? i.e. will ALL files created on date be copied or just one/some of them?
(4) Do you have any programming experience?

I don't guarantee to have a solution for you but willing to TRY after getting your answers.

2356.

Solve : trouble booting with boot disk?

Answer»

I have created a boot disk to boot it from MS_DOS. I copied the driver for Nic 3C905b for #com fast ether NIC in NETWORK FOLDER. Mapped those in protocol.ini. Also change in config.sys the driver name.
When I insert the disk in the computer, It KEEPS giving me "Protocol Manager has reported an incomplete binding."
Please I need HELP. I am very frustrated.
Here's a ref to the error message:

http://www.hitachipc.com/service/opsys_faq.html

It's about TWO thirds down the page.

2357.

Solve : network driver in config.sys?

Answer»

My config.sys FILE says ET32ND is for KTI ET/32 Network Cards. I have a LNEPCI2 CARD or winbond W89c940F card and the computer is not seeing it. Do I need to change this LINE in my config.sys to see this card? Please help!!

CatMore info on SYSTEM..delete the card from the device manager ....that you no LONGER use!

2358.

Solve : i need help pls?

Answer»

hello
my lovely girlfriend decided when she was shutting down my sony laptop that when it restarts it should do in ms-dos now all i get is a black screen

it starts like this

windows 98 is now starting your MS-DOSbased program

the following file is missing or corrupted C:WINDOWS\REALMODE\OAKCDROM.SYS
there is an error in your CONFIG file on line 4

c:windows>

and i havnt a clue how to get it to boot back to windows can anyone help me out ?ohh YEAH i FORGOT to say that the laptop has no floppy drive or cd rom OTHERWISE i would just re-install windows from my 98 cd and has no internet connectionAt the prompt c:\windows type win<enter>
Windows should load. Then start/run msinfo32 and tick the normal startup. It should start windows at reboot.cheers for that its now up and running

many many thanks f5 or ctrl KEY on boot...~~~start windows normally!

2359.

Solve : Dos Startup Sequence?

Answer»

i'm fixing this OLD computer up, and since some input devices are currently in need of REPLACING, i figured i'd throw the hd in to this compy (pentium 3 755mhz) and get all the stuff i need on there, on there. im putting MS-DOS 6.22 and Windows 3.11 on here, and all was going fine untill i installed dos. it told me to reset without any disks in the drives and it'd boot from the hd. it didnt. i checked bios, everything was set up rite, so i tried it again, but it got stuck where it WOULD normally read the boot device, be it the floppy or cd, or c:\. started up windows xp with the other hd as a slave, and it accessed it fine, and if i boot up with a ms-dos boot DISK, it is easily accessable.

i dont know whats wrong with it, mabey im missing a file? or i dont have autoexec.bat set up right? is a boot.ini required? i really dont know. any help you can give me would be greatly appreciated. thank you!iso sys file..........cheat download a ms6.22 boot disk from www.bootdisks.com........and use a:\ sys c:
file transfer message........now try it..hay, its the guy who wrote the message up there^

i didnt quite depict what you meant by your message, but i tried what i think you meant. i copied the startup disk ONTO the hard disk, and changed the auto.bat to suit. didnt quite work. i dont know waht u meant, but if you can paint me a clearer picture lolIs there anything you need on that harddrive? If there is not, I would simply reformat it and start over. Remember that Windows 3.1 can only use FAT16 not FAT32 or NTFS. Could this be the problem?

2360.

Solve : Help with Batch files plz?

Answer»

I searched this sight and I could not find my answer I don't even KNOW if this is possable

I am a cad user that that has 1 folder that has 100 or so files with MISC names but all have a *.tpl ending and they are structed like this ex. below There is nothing else in this folder but the tpl files i NEED edited. It is always 6lines down where the editing needs to start if that matters.

Some of these files have 30-40 entries.
Well I need to delete the S: that is evey file.
Can anyone help me with bat file I can stick in this directory and it will go thru all my files and delete that string?


DataCAD template file. version 01.10.

1
6
*
S:\LEGEND\WOODRAIL\R1
S:\LEGEND\WOODRAIL\R2
S:\LEGEND\WOODRAIL\R3
S:\LEGEND\WOODRAIL\R4
S:\LEGEND\WOODRAIL\R5
S:\LEGEND\WOODRAIL\R6

Thanks Chance

I am not sure what you are trying to do. If they are text files, open them up and most word processors will have a replace feature. Simply enter S: in the search box and leave the replace box empty and it should delete each instance of S:Try a batch file like this:

Code: [Select]@echo off

for %%i in (*.tpl) do (
echo processing %%i ...
if exist %%i.tmp del %%i.tmp
for /f "delims=: tokens=1*" %%j in (%%i) do (
if "%%j"=="S" (
echo %%k >> %%i.tmp
) else (
echo %%j%%k >> %%i.tmp
)
)
del %%i
move %%i.tmp %%i
)

Cheers,
[glb]cs[/glb]Neil. Yes I have used the replace comand. it takes QUITE awhile to open 100 files indvidual and Paste the S: in one field and replace all then CLOSE. I wish word would replace all, in different files. I felt like i was getting carpel tunnel.

cs ty very much, I will play with it.

2361.

Solve : got Downloader. Trojan-need HELP pls?

Answer»

Hi smart guys!

Please, HELP...Got Virus-Downloader.Trojan. Infected file-../sist32/2sl43.ddl

Tried to fix it through safe mode: scanned by norton antivirus as was recommended - didn't help...

SOMEONE told that I can rid of it through Mc-Dos - even DONT KNOW how to get into...sorry not god with this stuff, but desperately need to fix it ASAP without restoring OS if possible.

Dunno how i 've been so stupid to get this crap...

Please if U have any idea, help good girl, i'll promise to be carefull next time

Many thanx

2362.

Solve : batch file doesn't work on winXP_pro machine?

Answer»

content batch file:
Link86 &AMP; < FILENAME.ltx

content filename:
..\source\test1.obj, &
..\source\test2.obj, &
..\source\test3.obj, &
..\source\test4.obj, &
..\source\test5.obj, &
..\source\test6.obj, &
..\source\test7.obj, &
..\source\test8.obj, &
..\source\test9.obj, &
..\source\test10.obj, &
..\source\test11.obj, &
..\source\test12.obj, &
..\source\test13.obj, &
..\source\test14.obj, &
..\source\test15.obj, &
..\source\test16.obj, &
..\source\test17.obj, &
..\source\test18.obj, &
..\source\test19.obj, &
..\source\test20.obj &
TO outputfile.lnk

This construction WORKS oke on WIN98, but on WIN_XP_PRO I RECEIVE the message "Syntax of command is incorrect"

Can someone tell me what GOED wrong here ...
Thanks in advance!

2363.

Solve : Copying files from DOS to CD?

Answer»

I have an OLD computer and can't run windows properly and want to get some FILES off of it. I was WONDERING if its possible to COPY or move files to my CD writer from my C:\ drive while in DOS?Not without some DOS burning software. EASIER to remove the hard drive, install it into your new computer, then copy the files you want. Then use the old hard drive as a backup.Thanks for the reply. What kind of DOS burning software is out there?

2364.

Solve : Var name for new folder creation?

Answer»

Here is what I have so far and it works. So the help pages here have done me some good. But I WOULD like to be promped for a file name before the rest of this runs and that file name be the name that the "temp" directory is. So that temp dir is not OVERWRITTEN. "we have been deleting eachothers work on accident" Any help would be apriciated even if its just being pointed to some examples. I did go thru the ones on this site and did not see any that looked like they applied.
thanks Chance



Code: [Select]
@echo off
Echo Changing to the Print Server Monpath1 Directory!
m:
cd \
cd\tif's
cd plans
md temp
P:
cd \
cd Monpath1
copy monp01ath1.tif m:\tif's\plans\temp\2-Stem.tif
copy monp02ath1.tif m:\tif's\plans\temp\3-Floor.tif
copy monp03ath1.tif m:\tif's\plans\temp\4-Elc.tif
copy monp04ath1.tif m:\tif's\plans\temp\5-Elev.tif
copy monp05ath1.tif m:\tif's\plans\temp\6-Roof.tif
echo Finished COPYING files to Server Tif's/plans Directory!
del *.tif

Assuming that you just try to read a name from the DOS shell, use this:

Code: [Select]set /p name=Enter file name:
echo %name%
Older DOS versions (before W2K and W-XP) use the choice command instead of set /p.

Cheers,
[glb]cs[/glb]THANK you very MUCH. That is exactly what i needed
The finshed product is Code: [Select]@echo off
Echo Changing to the Print Server Monpath1 Directory!
m:
cd \
cd\tif's
cd plans
set /p name=Enter file name:
echo %name%
md %name%
P:
cd \
cd Monpath1
copy monp01ath1.tif m:\tif's\plans\%name%\2-Stem.tif
copy monp02ath1.tif m:\tif's\plans\%name%\3-Floor.tif
copy monp03ath1.tif m:\tif's\plans\%name%\4-Elc.tif
copy monp04ath1.tif m:\tif's\plans\%name%\5-Elev.tif
copy monp05ath1.tif m:\tif's\plans\%name%\6-Roof.tif
echo Finished copying files to Server Tif's/plans Directory!
del *.tif


I have been trying to figure this out all day. You are a life saver.You're welcome!

2365.

Solve : MSDOS PROBLEM???

Answer»

I get this POP up on alot of things i try to INSTALL and im REALLY CONFUSED here, someone please help me. http://support.microsoft.com/default.aspx?scid=kb;en-us;324767

2366.

Solve : How to run a batch file to Delete entries in *.ini?

Answer»

Dear ALL,

I am a new person

I have a question about DOS batch file COMMAND.

If I have a file (ABC.ini) and its format is shown as below:


[A_B_1]
master=LOC,123.123.123.123,00001
query=LOC,124.124.124.124,00001

[A_B_2]
master=LOC,123.123.123.123,00002
query=LOC,124.124.124.124,00002

Now, I want to write a batch file to delete all entries in the file (ABC.ini) for some KEYWORD.


such as KEYWORD is A_B_2, then

[A_B_2]
master=LOC,123.123.123.123,00002
query=LOC,124.124.124.124,00002

all of these are deleted.


Please give me some methods to deal with this case.

Thanks Thanks!!Use something like this:

Code: [Select]@echo off

rem Change file name and keyword here
SET FILE=abc.ini
set KEYWORD=[A_B_2]

set counter=0

if EXIST %FILE%.tmp del %FILE%.tmp

for /f "tokens=*" %%a in (%FILE%) do (
if not %%a==%KEYWORD% (
if !counter! equ 0 (
echo %%a >> %FILE%.tmp
) else (
set /a counter=!counter! - 1
)
) else (
rem Change number of lines to delete after keyword here
set counter=2
)
)

del %FILE%
move %FILE%.tmp %FILE%

Should work under W2K and WXP. Make SURE, command extensions and delayed expansion are enabled.

Cheers,
[glb]cs[/glb]

2367.

Solve : count filename characters?

Answer»

Hi Everyone
I try to create small batch file that searches for files with the extension .xls, when it finds it, counting how many characters file has. If it has more then one it writes the file name to text file. Can somebody help me with this and tell me how I can run it.

All help is greatly appreciated.


Marcin
Something like this?

Code: [Select]@echo off

rem Delete old log file
if exist log.txt del log.txt

rem Loop over all XLS files in current folder and extract file names and sizes
for /f "skip=5 tokens=3,4" %%a in ('DIR /a-d *.xls') do (
rem Ignore useless stuff also printed by 'dir' command
if exist %%b (
rem Compare file size with zero
if %%a equ 0 (
rem Write file name to log file
echo %%b >> log.txt
)
)
)

Cheers,
[glb]cs[/glb]Hi
Thank you so much for your response. I copy and paste it to the txt file with ext .bat. When I try to run it id doesn't create txt file. Can please tell me how to make it to work.

MarcinSave the code in a batch file (e.g. xls.bat) in the same directory as the XLS files are. Then call xls on the command line.

Are there any error messages?
Which WINDOWS/DOS version are you using?
Did you check if dir /a-d *.xls shows any files?
Are you sure that any XLS file is empty (zero bytes)?

Cheers,
[glb]cs[/glb]Hey

There are no error MSGS, all I do is to double clik on the batch file, but the dos flashes and doesn't do anything else and nothing else is created.

I am using Windows 2000 SP4 with all updates.

I am looking for excel files that are full, but I am not looking for the content of these files. I am looking for the number of file names caracters. So for example
there is a file called Marcin_Tomczak_wants_to_go_to_Europe_ne xt_year.xls.
So if I am looking for files where filename is longer then ...let say 40 characters long so this batch file should find this file insert it's name into the .txt file.
So the filename I entered above contains 46 characters and therefore should be included into that list.

Thank you so much for your help and I am very greatfull.

Marcin

I thought, you would like to check the file size. For file names try something like this:

Code: [Select]@echo off

setlocal

set n=15

for %%i in (*.txt) do (
set v=%%i
set w=!v:~0,%n%!
if not !v!==!w! echo !v! too long
)
n defines here the maximum number of characters (INCLUDING extension). Make sure, command extension and delayed expansion are enabled.

We are here close to the maximum you can achive with MS-DOS Consider changing to a "real" scripting language like Tcl, PERL or Python.

Cheers,
[glb]cs[/glb]

2368.

Solve : Dos equivalent of UNIX "&"?

Answer»

Hello,

Does anyone know how to run a program from DOS, and then run a second program before the first program finishes?

For example, in a UNIX script, I could do:

command1 &
command2 &

and this would EXECUTE command2 before command1 had finished.....

Thanks in advance

You can use the start command, e.g.

Code: [Select]start cmd
will start a new MS-DOS shell in a new window and you can continue working in the old shell while the new is still there.

A more advanced example would be:

Code: [Select]start /min cmd /C "dir /s > dir.log"
It's up to you to figure out what HAPPENS

CHEERS,
[glb]cs[/glb]Thanks a LOT, that works fine...You're welcome

2369.

Solve : Batch file creating other file?

Answer»

I need to create batch file that copies files from one network folder to ANOTHER one. The syntax is:

[size=10]xcopy \\comp1\Folder\*.* \\comp2\Folder\*.* /D /Y[/size]
...so the files are updated if they are older in destination folder. I would like to add some code that creates short timedate.txt containing information about time and date of operation. Is it POSSIBLE?
It would look like:
[size=10]"edit file timedate.txt"
"write current time and date as text"
"close timedate.txt file"[/size]
So there would be some information when was the last copy done.
It would be great to give error information to timedate.txt if copying failed for some reason (doesn't matter what).
Maybe it's easier to learn and write VB program. MS-DOS batch files are a crud, but still sufficient for that To write current time and date to a file use

Code: [Select]echo Last edit at %DATE%, %TIME% &GT;> timedate.txt

The return code of a command like xcopy is stored in an environment variable called ERRORLEVEL. If xcopy failed, the return value should be unequal ZERO, otherwise zero (WITHOUT guaranty, I didn't check). You can evaluate ERRORLEVEL with a code sequence like

Code: [Select]xcopy \\comp1\Folder\*.* \\comp2\Folder\*.* /D /Y
if %ERRORLEVEL% neq 0 echo xcopy failed >> timedate.txt

Cheers,
[glb]cs[/glb]*censored*.
Batch files are so simple and useful if you know how to use it!!!!
I want to learn more!!!
Could you recommand me some web pages about it?
This one is not enough.
I don't want to waste your time in a future.
Thank you for your help!! You are great.How to add info about number of files which were copied?
I could find it myself if I knew where :-/need to add information in timedate.txt about number of files that were copied....
...if I knew where to look for this information I wouldn't ask these basic questions http://www.chebucto.ns.ca/~ak621/DOS/Bat-Adv.html
I found something for myself

2370.

Solve : Help Me pls... %username%?

Answer»

As you KNOW TYPING %USERNAME% in the command prompt will return you the user's login id, now i would LIKE to try retreiving the user's DISPLAY NAME. Is there a %_____% for it? Please help me! Thank you!
Assuming that you're on 2000 or XP, you can type SET at the command prompt to see all the CURRENT environment variables.

Unfortunately for you, display name is not in the list.

2371.

Solve : Urgent -how to make an excel file with file list??

Answer»

I want an excel file which should contain the list of file NAMES of one perticular folder in hard-disck. How do I get this?

for ex. C:\ANISH folder contains three file for exp. 1)anish.xls 2) neha.xls and 3) bhavin.zip

now i want the xls file which shold contain only this three file NAME not anything else other than this.

File should contain only

anish.xls
neha.xls
bhavin.zip

not even date, time or file size.


Please help me urgently. Send mail to me on [emailprotected]
http://www.kayodeok.btinternet.co.uk/favorites/kbofficeexcelhowto.htm#kbhowtoGo to your DOS command prompt, Goto the directory that you want to list (use the CD command) and then type the following command after the > prompt....dir /b/o:e>OUTPUT.xls This will CREATE an excel file called OUTPUT and list the contents of the directory Name and Extension only and in extension order. *Note that you do NOT have to create the Excel file first, the command will do it for you and place it in the directory that is in the path of the command.
Good Luck
how do i get filecount and date each day that batch file is run and send to excel sheet


Every day keep appending the excel sheet with new row

date number of file
1/10/2004 200
1/11/2004 201
1/12/2004 200

.................. and so on

2372.

Solve : Renaming with Unique Name?

Answer»

Our shop is standardized on WIN2K. I've been tasked to write a batch file that will archive a given file to a specific directory each day at a specific time. Seems EASY using win2k "schedule task" executing a DOS batch file with REN or RENAME, but how do I assure that the archived file name is unique each time the batch file is run. Can I somehow append a timestamp to the name each time?You can insert the date and time into a filename using the %date% and %time% environment variables.

Ex: REN c:\path\filetobackup.ext "file %date% %time%.ext"
thank you for the suggestion. Please VERIFY then, I have a directory named TEST and a file named testfile.txt in that directory. The statement...

REN TEST\testfile.txt TEST\testfile %date%.txt

...should create a file in TEST named testfile20050113.txt

Use "quotes" for non-8.3 filename or path specs.

REN TEST\testfile.txt "TEST\testfile%date%.txt"

Also, this assumes you use a country= statement with a country code specifying valid DOS naming characters in the date. Forward slash (a commonly used date separator) won't work, but yyyy.mmdd or dd-mm-yyyy will. Search 'country codes' for spec and use it in the CONFIG.SYS or International FUNCTIONS of the OS.

2373.

Solve : Can I do a virus scan with dos??

Answer»

Can I SOMEHOW do a VIRUS SCAN on dos. I have Norton Antivirus 2004.See if you have a file called navdx.exe in your Norton FOLDER. This is the DOS scanner.If Norton lames out on you, F-Prot.com OFFERS their DOS-level virus protection as a freebie.

2374.

Solve : laptop hard drive formatting help.?

Answer»

Hi all,

I'm NEW to this forum... i was just wondering if ANYONE ever came across a problem when formatting their laptop hard drives where the format would stop after a percentage and not go on. It would stay at that percentage and not change. i've formatted many desktop's without issues but are there protection schemes or locking mechanisms on laptops that could create this issue? I USED the recovery disks and it SEEMED to format with the disks without an issue while my own manual format would get stuck. Any help would be appreciated.
Are you running with the AC adaptor connected, or trying this from the battery?

Do you have the BIOS screensaver/power saver features turned off? Sometimes the power saving gimmicks will stop the whole show unexpectedly. Run them only after you have the OS set up.

What laptop and drive is it?i have it running off the adapter. i dont think its a power issue because the recovery disks worked without an issue... its an acer laptop but not SURE what the hard drive itself is. i saw a lock/unlock command in one of the troubleshooting pages... would my problem be caused by this?

2375.

Solve : !!!!!!!PLEASE HELP!!!!!!!?

Answer»

Hi,

I am trying to get a .bat file to LOAD up 8 files at the same TIME. They all run under the same programme.

I have got it so the .bat file loads them, but it will only do it one at a time, and only loads the next when you shut down the CURRENT window.

How do I get it to load them at the same time, or one after the other with no interaction needed?In your batch file, use the START command to launch each of your 8 files.

THATS great. Works a treat.

Thanks.....

2376.

Solve : bat to close windows program?

Answer»

Probably easy but I've searched for over an hour and am TIRED....

Need to write a batch file to stop a program, program is started using task scheduler.

Not possible

A DOS program doesn't have access to any WINDOWS started programs. EVEN when the program is started in DOS you can't stop it from executing. I believe DOS just cannot do that

2377.

Solve : Counting with variables?

Answer»

Is there anyway of adding in DOS using variables,
ie;
COUNT=count + 1

I'm using DOS version with Win98se.

Thanks for any help given.Code: [Select]set /a count=%count% + 1
Cheers,
[GLB]cs[/glb]Oh, bad luck ... does only work on W2K and WXP

Cheers,[glb]cs[/glb]Yes, I noticed. :-/

Thanks for the effort.

Anyone else ? Use the following:
Code: [Select]@ Echo Off
SET T1=%temp%\TEMP.BAT
SET T2=%temp%\Set.BAT
SET T3=%temp%\Count.BAT
Echo.! > %T3%

:LOOP

rem <insert your code here>

echo e100'SET %%1='> %T1%
for %%? in (rcx 7 n%T2% w q) do echo %%?>> %T1%
DEBUG < %T1% > nul
type nul > %T1%
find /c "!" < %T3% >> %T2%
Call %T2% num
Echo Loop %num%
Echo.! >> %T3%
If "%1" == "%num%" goto Exit
Goto Loop

:Exit
DEL %T1%
del %T2%
del %T3%

'File.bat 100' will make it loop 100 times.Hey, Cool! thanks.

2378.

Solve : 16 bit windows subsystem?

Answer»

I followed the instructions on how to fix this error message: 16 bit windows subsystem
c:\windows\system32\autoexec.nt "the system FILE isnot suitable for running MS-DOS and Microsoft windows APPLICATIONS. It says to open window explorer, and locate config.nt files. I cannot locate them. Please somebody HELP ME fix this PROBLEM I cannot install webcam or uninstall the previous installation before error occuredWhich OS are you using? Under W2k, you should find these files in C:\WINNT\system32, under WXP they should be in some subfolder of Documents and Settings\<username>. I can't check it RIGHT now, I do not have WXP available :-/.

Cheers,
[glb]cs[/glb]it come out because your autoexec.nt at c:\windows\system32 is missing ......you can replace it from ANOTHER friend or you can find it at c:\windows\repair ....you just copy it and paste it in c:\windows\system32 then the problem solve
Here.... use this link... I had this problem a few months ago... http://support.microsoft.com/default.aspx?scid=kb;en-us;305521 Just so you know... When this page says to nsert the "CD" they want the Windows CD. This SHOULD solve your problem.... Keep in touch...

[glb]Flame[/glb]

2379.

Solve : MS-DOS 6.22?

Answer»

Does anyone know where I can get a copy of DOS 6.22?bootdisks.com........you may wish to visit a website called >freedos.. and try the LOST version of win97........msdos7.1 How do I find my current DOS version?ver typed in the msdos prompt...or DXDIAG in the RUN box or the device manager...will show it..ver gives
Windows 98 [Version 4.10.2222]

can't find anything in dxdiagWin.98 Dos 7.10Best SETUP I have is to overwrite a modded DOS6.22 with DOS 7.12 (Win98SE version) so you have the Long File Name and up to 64GB HD compatibility but still have the DOS6.22 utils that weren't obsoleted (includes Help Directory List function, QBasic, MS Basic, and a bunch of convenient add-on DOS UTILITIES that still work).Neil first page displayed in dxdiag ....win?? build...

is this a curious question? 4.10 2222
Nothing about DOS.
Yes it is a curious question

2380.

Solve : DELETING SIMILAR FILES IN DIFFERENT DIRECTORIES?

Answer»

I WOULD LIKE TO KNOW, I WANT TO DELETE, FOR EXAMPLE, BBY*.* IN THREE DIFFERENT SUBFOLDERS OF THE SAME MAIN DIRECTORY, IN THIS CASE E:\AMP1E
HOW CAN I DO THIS?What hinders you from using three delete commands in a BATCHFILE?

Code: [SELECT]del E:\AMP1E\<DIR 1>\BBY*.*
del E:\AMP1E\<DIR 2>\BBY*.*
del E:\AMP1E\<DIR 3>\BBY*.*
Cheers,
[glb]cs[/glb]

2381.

Solve : How to convert excel into text?

Answer»

How to convert EXCEL files into text files using dos COMMANDS and vice-versa.I don't think it's possible. You have to write a program/use a program, or use Excel's FEATURES of export/import (if I remember WELL).

2382.

Solve : Batch File and DOS Window Problem?

Answer»

Hi
I have a batch file which is called hourly by winXP schedule. The batch file copies files for backup purposes and then writes to a log file.

Whenever it runs it opens a DOS window on screen which remains for about 10 seconds. How do I prevent the window opening? I want the code to run without any indication on screen.

Any ideas anyone.
Many thanks
[glb]Scriptham[/glb]



Code: [Select]
@Echo off

Set constLine=**********************************************

:: copies current log to logold WAS concatenates current log to logold
if exist H:\log.txt copy /B /Y H:\log.txt H:\logold.txt

:: Redirects xcopy instruction output to log file overwriting existing data.
xcopy c:\inetpub\wwwroot\cLIMS\*.* F:\dat1916\LIMS\c_wwwroot_copy /E /Y > H:\log.txt
xcopy c:\inetpub\wwwroot\Default.htm F:\dat1916\LIMS\c_wwwroot_copy /Y >> H:\log.txt

:: Returns error level reported, this should be zero.
echo Error Level Is %ErrorLevel% >> H:\log.txt


:: Adds time and date, adds end marker of ***, adds 3 spaces, concatenates logold to end of log
ver | date | find "current" >> H:\log.txt
ver | time | find "current" >> H:\log.txt
echo %constLine% >> H:\log.txt
Echo. >> log.txt
Echo. >> log.txt
Echo. >> log.txt
copy /B /Y H:\log.txt + H:\logold.txt H:\log.txt

:END
Look at the files properties and select run minimized. It will show on the task bar when run but will not open a window.
Bang on the money of course and thanks very much.
Once I USED the search string "xp batch files run minimized" (wording as you indicated) it was clear that the question had been dealt with before.

What I find peculiar is that you can set run to minimized in properties of a shortcut (pointer I presume) to the file but not in the properties of the file itself.

Ain't windows peculiar?

I have set this up and will know soon enough if it does the job.

Thanks again
[glb]ScriptHam[/glb]A batch file is really just an ASCII text document with a .bat extention, nothing else. There is nowhere to store information about how it is to be ran, as it is not a program as such. But yes, Windows is peculiar.Quote

There is nowhere to store information about how it is to be ran

Thats what PIF files are for. PIF means Program Information File. Thats why you can run them minimized, maximized, in a window, in DOS mode, prevent them from detecting windows, auto close when finished, etc.I have had time to use the advice given above and to test it. There appears to be a further problem as it runs but maximized.

When the batch files are run by me they run minimized; click on shortcut on desktop. When they are run from Win XP Schedule they run maximized.

All files involved (.bat and .txt log files) have been set to run minimized.

Now I really am stuck as the schedule program doesn't have a run minimized property that I can find.

Does anyone have any ideas please.

Many thanks
[glb]ScriptHam[/glb]See what the command start does (start->run: CMD and then start /?). Make another batch file, let's say startm.bat, where you will have only one line: start /min your_batch_that_should_be executed.bat (the one that you already have, not startm.bat). startm.bat should be called by WinXP scheduler. Make your adjustments now (to close itself when it finishes for example). Does it work now?Thankyou Viking for your advice. I made some tests as follows. I MAY have not understood your last sentence but one.
Quote
Make your adjustments now (to close itself when it finishes for example)

How do I adjust it to close itself?

Experimenting with minimized files produced the following:
Code: [Select]
@echo off
call C:\batch\simple_xcopy.bat
:: echo running xcopy_simple.bat


Test 0. Call -> Run -> CallSimple.bat
Result. Dos Window opens and closes. Otherwise OK

Test 1. Start /min -> CallSimple.bat
Result. Dos Window opens in taskbar BUT never closes, so number that are open increases. Also opens briefly on screen and closes. Otherwise OK.

Test 2. Click desktop shortcut to CallSimple.bat
Result. No Dos Window, otherwise OK.

Test 3. Adjust batch file to call "Shortcut to CallSimple.bat." And adjust schedule to call "Shortcut to Simple_xcopy.bat.". Should these be .bat.Ink files or similar?
Result. Proposed but not tested yet. Is it worth doing?

Is this more or less what you recommended? I hope it is. Does anything spring to mind regarding the accumulating DOS window entries in the taskbar?
I think this is very promising, shame its not more simple.
I look forward to hearing from you.
[glb]ScriptHam[/glb]
:)ADDENDUM to post above.

Test 3. Adjusted batch file to
Code: [Select]
start /min C:\batch\"shortcut to simple_xcopy.bat.lnk"
And adjusted schedule to call "Shortcut to CallSimple.bat". Although it just reads CallSimple.bat

Result. Seems to work in that log file entries are made and the DOS window makes a momentary appearance on screen and in taskbar. This is definitely progress. But it does not add empty lines to the log file, log.txt, the code to do this is
Code: [Select]
Echo. >> log.txt
Echo. >> log.txt
Echo. >> log.txt


Up until a few hours ago these three lines were added as the batch file ran.

In the properties of the SHORTCUTS I have set the DOS window to 1pxl*1pxl BUT it flashes on screen at natural or normal size. Can this be rectified please.

These are not severe problems but if there is a quick fix I would prefer it. The log file is difficult to read without.
Many thanks for help so far.
[glb]
ScriptHam
[/glb]
2383.

Solve : Program Closes automatically, can I stop it??

Answer»

Ok So I have a basic Batch Program to Compile Java Programs USING the AVI Folder, the program works fine if I RUN it from the MS-Dos Window, however if I click on the batch file's icon, it opens MS-DOS, Runs the Program, and then Closes the Window. Is there anyway to make it keep the Window Open?

Here is the Code I have:

rem myautoxp.bat Jacob Primus

rem This file SETS the necessary environment variables to
rem be able to write and run Java programs consistently

path=.;C:\;c:\AVI;c:\WINDOWS;c:\WINDOWS\System32;c:\java;C:\j2sdk1.4.0_01\bin\

set classpath=.;c:\;C:\j2sdk1.4.0_01\src;C:\j2sdk1.4.0_01\lib;c:\java\

doskey

cd..

cls

cd f:

cd java





This should run the program and then bring me directly to my Java folder, but it closes. If I cant get this to work, I have to open MS-DOS everytime run the file, then find my java files every time. Please Help!If you just want to view the output use the pause command; this closes the DOS window after you press any key.

If you want to keep the DOS window open until you type exit, create a link to cmd.exe which calls your batch file:

Code: [Select]cmd /K <path>\<your batch file>.bat
The /k switch calls your batch file and remains in the DOS shell.

Cheers,
[glb]cs[/glb]Thank you so much, WORKED perfectly.

2384.

Solve : Batch file problem with Unicode names?

Answer»

My batch file contains

-----------------------------------------------------------------------

COPY /y ABC.exe "abc (Français).exe"

------------------------------------------------------------------------

but the OUTPUT file SHOWS garbled name.

Wheres when i RUN the copy command from command LINE it works.

Any idea.How can I make it work through batch file.

2385.

Solve : Close all the Programs Using a Batch FIle?

Answer»

Hi

Can any ONE please tell me how to CLOSE all the running programs on a windows 98 se machine with help of batch file.

Awating for RESULTS.

Thanks and Regards
Bharani Kumar S

2386.

Solve : changing filetype in ms-dos?

Answer»

I can't seem to find how to change a file to an .ISO. its a game i downloaded. It appears as a paint shop pro image, i tried running it off my nero image drive but i get a bad file extension: error 1000... a GUY told me to go into dos and rename it but he was in a rush so he didnt have time to explain... can anyone help me?Changing file NAMES in DOS is done with the move command:

Code: [Select]move <old> <new>
But you can also change file names in the Windows Explorer by CLICKING on the file's icon and press F2.

Cheers,
[glb]CS[/glb]ren oldfile newfile

2387.

Solve : The Invsible Boot CD?

Answer»

I am creating a bootable CD-ROM. I have tried MANY methods.

When I create a DOS startup floppy disk, I can see ALL the files on the disk, but when I create the bootable CD, I cannot see ANYTHING on the CD in Windows.

I am running Windows XP PROFESSIONAL with SERVICE Pack 2.are you refering to an iso file.....when you make a boot CD USING a boot disk and simulat an disk drive.
and you don't ad any ather programs to the CD windows wil sho you a emty CD. when you want to look at the file's from the disk you will have to start your PC whit the Boot CD.
when you yous winISO or ISObuster to look at the CD you kan see a *.IMG file that file contans the information from the Boot disk.

2388.

Solve : Using MSCDEX.EXE in Config.sys?

Answer»

I am trying to get DOS to mound a cdrom drive with a drive letter in the config.sys so that i can load further drivers from the CD is there ANYWAY i can do this, i have tried to do it in the AUTOEXEC.bat but this loads after the drivers would in the config.sys

any help apriciated, MarkMSCDEX provides access to CD-ROM drives and is loaded in the autoexec.bat file. In the config.sys file you have to load the drivers that came with your CD drive.

Ex:

in CONFIG.SYS: device=c:\devices\cdromdrv.sys /d:mscd000
in AUTOEXEC: c:\dos\mscdex /d:mscd000

the d: switch names must match or else it won't work.

Why not COPY the drivers on your CD to the hard disk and load them from there in the config file?this is being used on a CD i need to load the cdrom drivers from the emulated floppy disk on the same cdbefore i load the network drivers(they are located on a cd but cannot be seen on the cd because the cdrom has not been mounted)

I had tried to put it in the config.sys as this loads before the autoexec.bat (using the INSTALL command) although in the config.sys loads all the "DEVICE" commands Before the "INSTALL", is there any way to program it to load

"device=oakcdrom.sys /D:mscd001
INSTALL=A:\MSCDEX.EXE /D:mscd001"

before loading

"DEVICE=\B57\protman.dos /I:A:\B57
DEVICE=\B57\Ntsts.dos
DEVICE=\B57\B57.dos
DEVICE=A:\NET\DLSHELP.SYS"The best I could come up with is that MSCDEX can only be loaded from the autoexec.bat file or from the command prompt.

I even CHECKED my PC DOS 7 manual (brown with age but still readable).

This is quite a dilemma. Maybe someone else can post a solution for you.

look on page 16 topic Making a dos BootCD, I hope it wil help. had kind of the same problem.

2389.

Solve : Data Backups Using a Batch Program?

Answer»

Hello all, I am a newbie here. I am trying to create a batch file to backup all my users data and settings. We are in an XP environment. I also would like to be able to automatically zip the files and ftp to a LOCAL server on our LAN. Any help is greatly appreciated. Thanks. Copying complete directory trees is done with xcopy /e. See xcopy /? for details.

If you have WinZip, you can use wzzip for zipping files from command line. See wzzip /? for details. (The FOLDER containing wzzip.exe is normally not part of your PATH environment variable -> add it.)

WXP professional should include the ftp command for accessing FTP sites from command line. See your Windows help for details (ftp /? does not work)

Cheers,
[glb]cs[/glb]CS - What I am asking for is more help. I am DOS (command line) iliterate for the most part. Can you help in getting me going in writting the batch file/ftp script etc.? Thanks again for any help.Hi even I am trying to do the same thing. I have gone thru the xcopy command. What I want is that form the current machine, I want to log on to a different machine and backup or copy the entire D: drive to the D: drive in current machine. This is what I wrote in a batch file. Offcourse I am missing somthing. Could anyone help.

xcopy \\remote server\d\ /c /e d:\ backup\

when I type the command in cmd in the machine, it works. What I want to know is how do I write this in a batch file so that the machine LOGS into the reomote machine and STARTS copying.

I looked at start cmd & it starts cmd but how can I write the command in the file so that when the batch file is run, it would open cmd and type the xcopy command.Don't you know how to create a batch file? Start an editor (e.g. notepad) and write your xcopy command. Then save this file with a .bat extension, e.g. backup.bat. You can now double-click on the batch file's icon in the Windows Explorer and the batch file is executed.

Cheers,
[glb]cs[/glb]I do, but in the batch file, how do I type the command after opening cmd.
That is what I am confused aboutThe command it's the name of the bat file.
For example, if you made with EDIT or notepad a file called mycopy.bat with one line in it (it doesn't matter the number of lines):

dir c:

and after that you saved the file and you want to launch the bat file, you have to go in the directory where the file mycopy.bat is (using the command cd for example -- type cd /? in the command prompt for more details) and then type just:

mycopy

or

mycopy.bat

(for safety)
and all the commands in the bat file should be executed (of course, if they are well written, with no errors).
That's the basic, the very basic part of what you can do.


Note: edit
To launch edit, you have to go in command prompt and there type

edit

After that you write everything you need; save the file (be cautious with the file extension) and that's it.

2390.

Solve : Can't get to BIOS?

Answer»

I've got an old Dell Latitude CP laptop with a pentium processor (size unknown), and windows 98 loaded. I don't get the message during boot to access the BIOS, I've tried several keys and COMBINATIONS THEREOF but no luck. Anyone have any IDEAS? Thanks.It could be the Delete key... or F1, F2, ..., F10, F11, F12... any. Try all of them. Immediatelly as the computer button is PUSHED on and for a few times (it is ENOUGH a single key push, but... it is sure with many )

2391.

Solve : Redirect LPT2 to LPT1?

Answer»

Is there a COMMAND to REDIRECT LPT2 to LPT1 permanently?
Perhaps a command that would be entered in config.sys or autoexec.bat?MODE LPT2 :=LPT1 :
Place in AUTOEXEC.BAT file.

2392.

Solve : DEBUG get DOS DATE?

Answer» HELLO, please i need to SHOW the current date using DEBUG, something LIKE MOV ah,2a. thanks.
2393.

Solve : format C?

Answer»

I am trying to format my computer using the format c: command. After I enter the command, it asks for a VOLUME command. I am not sure what to enter. Can you help?What do you mean with volume command? Could you post your screen output?

Cheers,
[glb]cs[/glb]hey,

am taking you created a nuke disk, NUKED your computer, did a fdisk and created a partition and then the format stage.

when it says volume command, is this after its completed 100% and says numbers to you. depending on the size of your hard disk it might say 6,000,000 kb

and says, would you LIKE to give the drive a label. hit enter for none?

am not sure what it means to be perfectlly HONEST, i think it just means giving it a label.

the times i have formated, i would hit return at this stage, does that sound similar to what has happened to you?You are completely right. You can just give a NAME to your drive. If you do not specify one, nothing happens

Cheers,
[glb]cs[/glb]

2394.

Solve : Find Folder/Directory Size--HELP!!!?

Answer»

How to find a DIRECTORY / folder size using dos COMMANDS or BATCH scripts?Could you be a bit more specific?

CHEERS,
[GLB]cs[/glb]

2395.

Solve : MS DOS - WIN 98 - CD/DVD Recognition?

Answer»

Son crashed his T22 IBM Laptop.

Original operating system was W98. He INSTALLED W2000, which never really worked b/c he did not update BIOS.

He has lost all the SYSTEMS product software, and we are having to rebuild. We have a Win98 startup disk. We did a FDISK and FORMAT c: /s The computer will not start - but bypasses - Win98 screen flashes and then the system goes to C: DOS prompt.

We located a partitioned drive on the hard drive it is D:

The operating system is on D: - we have the Win98 CD, but the computer does not recognize the CD/DVD ROM drive. So we can not use the WIN 98 CD.

We need to get the computer to recognize the CD/DVD ROM drive so we can load the WIN 98 CD updates.

Any suggestions?

THANKS - DeeDee Smith - AZ RatterIt does not have to update the BIOS to use Windows 2000...
It's better to look for a boot disk on INTERNET, with cd support.

I did a search on www.google.com with the following string:

win98 boot disk

And I found quickly:

http://freepctech.com/pc/002/files010.shtml

Be sure that are many more, and one of it will satisfy your needs (will have cd-rom support too).

2396.

Solve : Need to add a line to a file?

Answer»

I need to OPEN a file, add a LINE to the end of that file then save it back as the original file name, but I don't know how. SOMEONE PLEASE HELP!!!! mbYou could try:

echo "add this line" >> myfile.whatever

2397.

Solve : Shortcuts within DOS?

Answer»

Hello. I am RUNNING FreeDOS on a 386. What I am trying to do is add certain programs to the PATH variable without adding each program's installed directory. My solution is to create shortcuts to all the programs in a certain directory and add it to the PATH. My problem is, I dont know how to make shortcuts. Are there shortcuts within DOS (NOT windows), or do I have to make BATCH files? If so, what would I write in them, and how can I make them so that they dont change the directory the prompt is at when the program is done running?This is pretty straighforward. SINCE it's not Windows, you will need to create a batch file for each program you want to run.

Example:

@echo off
cd\directoryofyourprogram
yourprogram.exe

Thats pretty much it for your batch files. Put your batch file(s) in a directory on your path or expand your path to include a new directory where your batch files reside.

Hope this HELPS.

Thank you!

2398.

Solve : Can we change IP Address using batch file?

Answer»

Can we change IP ADDRESS or IP configuration using batch file. this is frequently REQUIRED to meI am not AWARE of a dos command to do that if it's a manually entered address. you can use ipconfig /release | ipconfig /renew, but I THINK windows requires a reboot for that to become effective. (Further, my experience with Windows would be that the things it wants a reboot to change, but you find an END around for?... will usually result in a system crash - so it got it's reboot anyway.

rotsa! - the little lebowski

2399.

Solve : Change Date then return date?

Answer»

I want to:

[change the system date -> RUN APP -> change date back]

using a BATCH file

I've been trying to write the CURRENT date to a file so that I can read it back again and reset the date but I've failed. Can anyone HELP?

Thanks

MarkMark190,

You could TRY this code snippet:

SET currdate=%date%
date xx/xx/xx <-- put your date here
RUN APP
date %currdate%


2400.

Solve : Counting number of files moved?

Answer»

Hello,

I created a simple batch file that will sort existing files into individal folders. That part WORKS as I wanted. What I would like to do is write to a log as to how many files are now in the created directories.

Is this possible? Would like to export it into a log file.

Thanks,

Eric

Here is an example of what I have



IF EXIST *G01*F01* md G01\FOV1
If EXIST *G01*F02* md G01\FOV2
If EXIST *G01*F03* md G01\FOV3
If EXIST *G01*F04* md G01\FOV4
If EXIST *G01*F05* md G01\FOV5
If EXIST *G01*F06* md G01\FOV6
If EXIST *G01*F07* md G01\FOV7
If EXIST *G01*F08* md G01\FOV8
If EXIST *G01*F09* md G01\FOV9
If EXIST *G01*F10* md G01\FOV10
If EXIST *G01*F11* md G01\FOV11
If EXIST *G01*F12* md G01\FOV12


move *G01*f01* G01\FOV1
move *G01*f02* G01\FOV2
move *G01*f03* G01\FOV3
move *G01*f04* G01\FOV4
move *G01*f05* G01\FOV5
move *G01*f06* G01\FOV6
move *G01*f07* G01\FOV7
move *G01*f08* G01\FOV8
move *G01*f09* G01\FOV9
move *G01*f10* G01\FOV10
move *G01*f11* G01\FOV11
move *G01*f12* G01\FOV12

REM GROUP 2

IF EXIST *G02*F01* md G02\FOV1
If EXIST *G02*F02* md G02\FOV2
If EXIST *G02*F03* md G02\FOV3
If EXIST *G02*F04* md G02\FOV4
If EXIST *G02*F05* md G02\FOV5
If EXIST *G02*F06* md G02\FOV6
If EXIST *G02*F07* md G02\FOV7
If EXIST *G02*F08* md G02\FOV8
If EXIST *G02*F09* md G02\FOV9
If EXIST *G02*F10* md G02\FOV10
If EXIST *G02*F11* md G02\FOV11
If EXIST *G02*F12* md G02\FOV12

move *G02*f01* G02\FOV1
move *G02*f02* G02\FOV2
move *G02*f03* G02\FOV3
move *G02*f04* G02\FOV4
move *G02*f05* G02\FOV5
move *G02*f06* G02\FOV6
move *G02*f07* G02\FOV7
move *G02*f08* G02\FOV8
move *G02*f09* G02\FOV9
move *G02*f10* G02\FOV10
move *G02*f11* G02\FOV11
move *G02*f12* G02\FOV12
Code: [SELECT]set ctr=0
if exist *G01*F01* (
md G01\FOV1
move *G01*f01* G01\FOV1
set /a ctr=%ctr%+1
)
echo Moved %ctr% files > log.txt
Works only on W2K and WXP.

Cheers,
[glb]cs[/glb]Thanks, I tried that. However since the move function only happens once, it only reports one file moved.If you have a list of files, you must call this routine for each file of course (like in your example).

You could also use a for LOOP to loop over selected files.

Cheers,
[glb]cs[/glb]