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.

3601.

Solve : Loading Win xp problem/ dos?

Answer»

Can someone please tell me what may be the problem with the following, I am TRYING to load winxp, on a pc, I put the boot disk in the a drive and boot from the floppy, then I typed smartdv , and then I try to change to the directory with the winxp cd by typing (cd d:\) but it will only change to the directory only for a brief moment then it defaults back to a:\. So I am unable to run the file i386 on the cd drive. Is there something wrong with the cd drive?? I have tried typing cd d:\, e:\, f:\, etc...nothing works, it keeps DEFAULTING to the a:\. PLEASE HELP, THIS SEEMS SO SIMPLE. THANKS :-?Your winxp disk is BOOTABLE, you need do no more than set your cdrom as 1st boot device and boot with the xp disk in.Ok sounds like that would work, but how do I set the cdrom as the 1st boot device? :-?williamsan...... Go into the bios ....... and change the boot sequence to cd-rom first boot ......then save the changes and exit ...... Place the win xp disk in the cd -rom and reboot ..... ( If your cd is bootable it will do the rest ) .....
Please only post in one section ...it just confuses everyone .


dl65 Ohh ok sorry for posting in multiply sections.

Ok so to go into the bios, I hit F2 when the system boots right? This is where I can change this right?If you have a Dell, that is true. What computer or motherboard make/model?it is a dell, but not sure what mother board, this computer was given to me recently. I am getting ready to try this now since I am home now. Thanks, will let you know what happens.I set the boot sequence to the cd drive but now when I boot up, I get "strike F1 to retry boot, F2 for setup utility" does this mean the cd is not a boot cd? what do I do now?First get the service tag from the outside of the case (a 6 digit or so series of numbers and letters) or get it from the the bottom right hand corner of the screen when you press the key for setup.

Once we know that, we can advise.
ok it is JZJ5F11OK, you have a GX240. F2 to get in the BIOS screen and under boot sequence, you indicate CD first, floppy second, hard drive THIRD. Hit escape to save changes and exit. Put the CD in the drive when you reboot and off you go, No boot floppies needed.

Is that a real Windows CD you have there?Ok I did that, however under the bios boot sequence selection I can only check or uncheck the cd, floppy, and hard drive, so I should check all 3??? Anyway I have checked and unchecked all 3 options and that still did not work and I saved my changes too.

The cd I have is a copy of Windows xp, but when I did it on my other computer it worked fine, but I had to boot with the floppy and switch the drive to get the setup file off of the cd. So hummm...I guess I will try another windows cd, once I find one. Do you think that is the problem???

But you know, I was upgrading my other computer from win98 to winxp, do you think that is why it worked on that one and not this one?It's got more to do with order once they are checked. You can rearrange this.

If that is a bootleg CD all bets are off. It may be missing some files. If you have to copy the files off the CD, you have at least 2 other problems.

3602.

Solve : Three days of work but nothing?

Answer»

[size=14]Hi

I need your help guys i have been trying to solve my problem for three days

I've made bootable cd to restore an image or to run any program from the cd my problem comes up when I tried to develop my cd because now I have 1 cd rom and 1 cd writer the new idea is to use if to check if cd is in drive (S) or in drive (T) to run the correct line here is my batch


@ECHO off
echo.

echo Loading...
echo.

:TryS

if not exist S:\prog\X.exe goto TryT
goto RUNS

:RUNS
Call S:\Prog\X.exe
goto RUNMAIN


:TryT
if not exist T:\prog\X.exe goto RUNMAIN
goto RUNT

:RUNT
Call T:\Prog\X.exe
goto RUNMAIN


:RUNMAIN
a:
Main.bat[/size]Need a little more INFO here.
What OS?
At what point is the batch file failing or is it runnung at all?
If booting to DOS, did you load command.com?[size=16]my os is xp but i am using bootable cd so i am using dos

The problem happens when the batch look for the drive S: (cd rom) and found no cd so it cant continue
because i boot from the other cd rom[/size]This post can now be REFERENCED in the DOS forum under "I dont know how to do a batch".

Where is GX1_Man with his dental practice? Pulling teeth, my *CENSORED*...more like blood from a stone

3603.

Solve : Cant access new hard drive in DOS?

Answer»

I have just bought a NEW Fujitsu 60GB hard drive for my laptop.

BUT, I cannot access either the old or new drive within DOS.
I have created a DOS startup disk within XP and that works FINE, I reboot and up comes the A: prompt, but when I type
C:
I get an error message saying ' Invalid Drive Specification'
Therefore I cannot access my new OR old drive to format it and get it ready to INSTALL XP again.

PLEASE HELP!!! I am desparate for some aid...I need to get my pc up and running again to record some music...A HUGE THANKS to anyone that can help..
Paul Taylor
DOUBLE POST

Please SEE responses to other posting. Multiple posts are confusing. Thanks.

3604.

Solve : USB support for DOS?

Answer»

What am I doing wrong?

As a result of a virus attack in my computers boot sector I was unable to access files and emails through Windows and faced the long and tedious process of using DOS commands to recover these files.
This process proved very UNSATISFACTORY and time constraints forced me to give up and format my HDD.
I previously had noticed that my BIOS gave me the option of USB support for DOS so I enabled this option ( thinking that in future I could use my Memory Stick) and after REINSTALLING windows XP etc downloaded Duse.exe and followed the directions to load this in my floppy Boot Disk Config.sys file.
I have tried just about every option available for loading this as a device however the result is always that 2 USB Drive letters are installed but not their IRQ's and my memory stick is not recognised.Do you talk about using usb memory sticks with standalone DOS?

There are drivers. I THINK it was from philips. But there is no guarantee that they work with your memory stick.
(I failed with my sony memory stick.)
You need the usb driver and the harddisk driver.
Google a bit.
Try also the SEARCH in computing.net. There was a description at the standalone dos FORUM. (Not cmd in Windows!)

hope this helps
uli
Update! :-/

Using usbaspi.sys from Panasonic in my boot config.sys my usb memory stick is found however no drive letter is allocated to enable it to be accessed???

3605.

Solve : Can we hide or mask user input??

Answer»

Hi,
I have a batch file that will generate an FTP script and execute it to transmit data between the PC and an IBM z/OS mainframe. The password is entered by the user via the SET /P command, but the password entry is displayed on the users screen and is subject to shoulder surfing. Is there any way to hide or mask the data entered via the SET command, or is there another method to accomplish this? Any help would be appreciated.

BillRWe recently had this very same question. Typed data is not taken from the command line and made available from the keyboard device until the enter key is pressed. Since you cannot read a single character as it is typed, there is no way to intercept the character and echo a * or space to the command line. Instead, you can only read complete lines.

You would need to write a front-end GUI for this.

Hope this helps. 8-)Thanks, I had a feeling there was a REASON I couldn't find an easy solution. I did find a solution using QBASIC(from Timo Salmi), but that presents another issue altogether. I don't believe any of the users have QB installed. And I don't have any experience with GUI's, so I am at a loss with that approach.

I'll KEEP plugging away on a solution for the users, but in the meantime I have a solution that will work for me!

Thanks Again
BillYou could write a little assembler program to read a word without echo when this is send to a file:

C:\DOCUME~1\sirio>debug readChar.com
-a
15C2:0100 mov ah,08 <-- read a character without echo
15C2:0102 int 21
15C2:0104 cmp al,d <--is the newline?
15C2:0106 je 110 <-- YES: end
15C2:0108 mov dl,al <-- NO: send the character to console
15C2:010A mov ah,02
15C2:010C int 21
15C2:010E jmp 100 <-- read another char
15C2:0110 ret
15C2:0111
-r cx <-- write in the CX register, the size of the program
CX 0000
:11
-w
Escribiendo 00011 bytes
-q

C:\DOCUME~1\sirio>readChar > pasw.txt
-here, I write HelloWorld-
C:\DOCUME~1\sirio>type pasw.txt
HelloWorld

3606.

Solve : File Deletion by date?

Answer»

Hi

Operating System : XP Pro

I wish to create a batch script that will AUTO delete *.avi files from my computer that are more than 2 (configurable) weeks old. The files are created from my security IP Camera's and can get rather large consuming LOTS of disk space.

The files are stored in a number of sub-directories on my computer and I plan to execute the script upon system startup.

Help much appreciated

PJBatch files do not have the functions to do date/time arithmetic unless you are prepared to WRITE a boatload of IF statements. Using a Windows Script would be a better solution. Perhaps this little script from my snippet closet can help you out:

Code: [Select]Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("FolderName") ' See note 1 below
Set colSubFolders = f.SubFolders

For Each objFolder in colSubFolders
ShowFiles objFolder
Next

Sub ShowFiles(Fld)
Set k = fso.GetFolder(Fld)
Set s = k.SubFolders
Set kf = k.Files

For Each objFile In kf
If objFile.DateCreated < date - 14 Then
If UCase(fso.GetExtensionName(objfile)) = "AVI" Then
Wscript.Echo objFile & " " & objFile.DateCreated 'See note 2 below
End If
End If
Next

For Each SubFolder In s
ShowFiles SubFolder
Next
End Sub

Note 1: replace FolderName with the top level directory where the AVI files live. SAVE the script with a VBS extension. To run, enter cscript Scriptname.vbs at a COMMAND prompt.

Follow the instructions for Note 1 above. Run the script, if you like what you see, follow the instructions for Note 2.

Note 2: replace entire line with fso.DeleteFile objFile, True
Note 3: You can use the task scheduler or the startup folder to have the script run at startup, but have the script run with wscript instead of cscript

Good luck. 8-)

3607.

Solve : The old format 8.3 ...?

Answer»

A curiosity:

In order to ERASE all documents finished in letter c, it's possible to be made:

del *.*c

but ¡be careful! also delete the archives that have letter c in 3 position:

X:\>dir
El volumen de la unidad X es WINDOWS
El número de serie del volumen es: E04F-EDB2

Directorio de X:\

08/01/2006 21:12 <DIR> .
08/01/2006 21:12 <DIR> ..
03/02/2006 10:29 73 prueba.bat
27/09/2005 13:55 2.023 interfaz_de_usuario.gif
07/02/2006 15:41 <DIR> olds
20/12/2005 16:35 16.074 carta.doc
07/02/2006 15:40 45.056 basura.doc
07/02/2006 15:39 43.520 mw.doc
07/02/2006 15:37 392 top.secret <== This document will be deleted
07/02/2006 15:48 3.632 pingo.c
7 archivos 110.770 bytes
3 DIRS 1.178.927.104 bytes libres

The command del *.*c will delete any file that has the letter "c" ending in the extension. Try using del *.??c to delete files with "c" in the third posiiton of the extension where the extension is three CHARACTERS. You can EXTEND this with del *.??c* which will delete any file that has a "c" in the third position of the extension. Using wildcards, while helpful, can lead to unexpected results.


Good luck. 8-)

3608.

Solve : upgrade dos?

Answer»

Is there anyway to upgrade my version of dos. I try to work with dos commands I see on the net, and a lot of times the results are not the same.
I run Win98 version 4.10.1998

ThanksWhich commands are you having problems with??? Is it possible you are finding differences between Dos commands and NT command prompt commands???What are you trying to accomplish?prompt $g $p is suppose to SHOW the time and date I get nothing

when I type time I get current time and a line under that that says enter new time.

Also like that .bat below....and when I tell them to locate DRM4.txt (which should be on there desktop) they say they can not find it anywhere in there pc.

So I assume my version of dos is not the same as others or is maybe out of date. The following .bat works PERFECTLY on my pc, but does not work on some others.



@echo off
echo.
echo.
echo.
echo.
echo.
echo This bat Program is for exporting the following keys
echo and or sub directories.
echo Produced by Dwight
echo Do not use without direct permission
echo Do not edit unless you are knowledgable
echo This will place a file on your desktop called DRM4.txt
echo copy this file and paste it back here.
echo.
echo.
echo.
pause
cls
echo.
echo.
echo.
echo.
echo.
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo ~ ~
echo ~ RegXport ~
echo ~ ~
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo.
echo.

pause
cls

echo.
echo.
echo.
echo.
If not Exist C:\DRM437 MkDir C:\DRM437
regedit /e C:\DRM437\ok1.txt "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run"
regedit /e C:\DRM437\ok2.txt "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"

copy C:\DRM437\*.txt = DRM4.txt
del C:\DRM437\*.txt
rmdir C:\DRM437
echo.
echo.

pause
cls
exit
The Time command you are using is doing exactly what it's supposed to do, show you the current time and prompt you for a new time. See here.

Are you trying to run your .bat file on another pc also using Win.98??? If you are trying to run it in NT the results may well be different. Have you checked the Path on the pc's where you have a problem, perhaps the correct Path is not available on those pc's.

Prompt $p$g on my pc shows the current directory followed by > (C:\>) -- Have you tried prompt $d $t for date & time?? See here. OK I know this is for XP but try them in 98 just for the fun of it...



Good luckHi, okay typing in prompt $D$T displays the Sat 02-04-2006 15:26:20.75

Is there anyway to rectify the problem with RUNNING .bats on other machines.
This is a real problem for me when I need to export reg keys or delete things from the registery for people on line. I work on this site http://forums.thetechguys.com/forumdisplay.php?f=22
Thanks ~ DwightSorry Dwight, I really don't know how to run .bat files on remote pc's. Without knowing the SETUP of the remote pc I think it will be almost impossible to guarantee the outcomes especially if the OS's and Paths differ.

I run XP (Home edition). The thought of someone editing the registry of my pc without first ensuring that I have recent backup gives me the dry horrors bearing in mind that the entire XP Registry should NOT be Exported/Imported for backup purposes, see here.
System Restore will also backup the entire Registry.


The result of using Export/Import with the entire XP registry is that the Imported registry will be MERGED with the existing registry rather than replacing it, think of that for a disaster.


I hope someone with a higher level of knowledge than mine will respond to your query.Yes I understand that importing a reg key will merge it with the registery. I never ask that the whole registery be exported...just certain keys. For example lets say you had W32/Sober-C on your pc which is an internet worm. I would ask you do run a .bat file that would export the following keys to notepad.

HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Run

In these keys I would look for the random charcaters that are placed by the infection, if found I would make a regedit4 and have you import these keys back into your registery removing the infection startup point.

HKLM\Software\Microsoft\Windows\CurrentVersion\Run
"cjghw"=-
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
"invhsur"=-

At this point we would be able to FINISH with the eratication of W32/Sober-C.
So this I why I need to be able to work on differnet types of pcs.
Is there even a web site that gives a list of the registery keys for the different os out there so I can compare and locate the differences.

Thanks for coming back Dwight, and for your explanation.

However I still shudder to think of the registry being remotely updated without backup having been taken immediately prior to the update.

I do not know of a website with the info you want, perhaps searching the MS KB will show you something.

Good hunting...Okay I will give that a try.....thanks for your help Dusty.

3609.

Solve : path??

Answer»

whats the path to WINDOWS xp home desktop USING 8*3 format.Might be c:\docume~1\%username%\desktop

Note: if the username is more than eight characters, use the FIRST six and add ~1 to the end.

Hope this helps. 8-)

3610.

Solve : Is there any command to slow the time of computer??

Answer»

Does anyone know how to MAKE time pass SLOWER in my computer?Any command or program?Thanks!!!This is a rather strange request. I suppose you could write some code and reset the CLOCK BACK a second on each pass thru a loop. After a while you may find yourself in the middle of last week.

A slower processor wouldn't CHANGE the time, but it would appear the simplest tasks take forever.

H.G. Wells had a time machine that went backward and forward in time. But he's dead, doubtful he could help.

What are you trying to do?

8-)

3611.

Solve : Delete subdirectories with spaces?

Answer»

Dear experts,

The appended script is extracted from Sidewinder:

set count=0
for /f %%i in ('dir /a:d /b /o:-n d:\test') do ( call :delete %%i)
goto :eof:delete
set /a count=%count%+1
if %count% GEQ 3 rd d:\test\%1 /s /q

and it works on subdirecectories like D:\Test\20060112

I also have subdirectories like D:\Test\2006 Feb 01
which have spaces in between. I have tried the FOLLOWING:

for /f %%i in ('dir /a:d /b /o:-n d:\test') do ( call :delete "%%i"
also
for /f delims= %%i in ('dir /a:d /b /o:-n d:\test') do (call :delete %%i

but it does not work for subdirectories like D:\Test\2006 Feb 01 where there
are spaces in between.

I need help.

Thanks in advance.
One of the problems with batch coding is that you end up coding the data, not the method, resulting in batch files that are very specific to a situation. The FOR statement uses spaces and tabs as the default delimiter. ADDING an override delims= clause should fix this.

This little snippet should help you out:

Code: [Select]@echo off
set count=0
for /f "delims=" %%i in ('dir /a:d /b /o:-n d:\test') do (
call :delete "%%i"
)
goto :eof

:delete
set /a count=%count%+1
if %count% GEQ 3 rd "d:\test\%1" /s /q

8-)

Note: There will be an extra quote generated by the code. If you don't mind, neither will the processor.

Dear Sidewinder,

Thank you very much.

You may want to hold off on the thanks. Once again I missed the obvious. When the dates were numeric (YYYYMMDD), the sort worked fine, but now that you have literal months this approach will get all fouled up. Consider: with all things being equal, February, April, August, and DECEMBER will all sort before January. Probable not what you want.

This should work more BETTER and get rid of the extra quote (actually it will add some extra spaces, but again the interpreter won't mind). A Windows Script would be a better solution, but most people see scripting as programming and run for the hills when it's mentioned.

Code: [Select]@echo off
set count=0
for /f "delims=" %%i in ('dir /a:d /b /o:-d d:\test') do (
call :delete %%i
)
goto :eof

:delete
set /a count=%count%+1
if %count% GEQ 0 rd "d:\test\%1 %2 %3" /s /q

As mentioned, you end up coding the data. You could also try adding the /s SWITCH to the dir command, but that may introduce a whole new set of problems.

Better luck this time. 8-)

3612.

Solve : What's wrong with this .bat file??

Answer»

Am using ERUNT to backup my REGISTRY. In windows "Scheduled Tasks" I created a batch FILE to backup the registry at startup.

This is the batch file I created for this purpose:

AUTOBACK.EXE %SystemRoot%\ERDNT\#Date#/noprogresswindow /noconfirmdelete /days:7

Everything works fine, runs on startup, backs up to appropriate folder, but even THOUGH I used the switch /noprogresswindow, I still get the progress window appearing on my desktop.

What's wrong with this scenerio? :-?After STARING at this CMD. line for half the night, I finally figured out what was wrong.

Needed a space between the # and /. Great backup everytime I start my PC.

3613.

Solve : thinkpad cd rom problem?

Answer»

Hi,I have a thinkpad 760el laptop which ran on w98.I have just reformated it and now i cant load windows.
It only has one DRIVE bay for floppy or cd .The problem i am having is the laptop wont FIND the cd rom so i can load w98.
When i press f1 to get the setup screen all i can see in startup is floppy 1 or hd 1.
There is no sign of a cdrom drive.
Is this DUE to me not being able to load cdrom drivers from the startup floppy?
Any HELP Thanks Pete. You need a DOS - bootdisk with CD-ROM drivers.
The MSCDEX must be loaded.

www.bootdisk.com or barts bootdisk builder has ready Bootdisks.

hope this helps
uliHi, Thanks for reply.I have tried BOOT disks but as i only have one bay for cd or floppy the driver wont load for cd as it cant find cdrom. the startup disk only loads to a ram drive which is lost when i re boot .is there any way to load set up from the ram drive to C drive as once the cdrom drivers are on c i hope i can boot with cd rom.There are some rather exotic workarounds, but it is a whole lot easier to buy a bootable CD made for this purpose. There's a gazillion on eBay. Here is just one listing and a link to look for more:

http://cgi.ebay.com/FIX-EMERGENCY-REPAIR-BOOT-CD-WINDOWS-XP-NT-95-98-2000_W0QQitemZ7217588873QQcategoryZ182QQrdZ1QQcmdZViewItem

http://computers.search-desc.ebay.com/load-Windows_Other-Software_W0QQbsZSearchQQcatrefZC6QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfgtpZQQfposZQ5AIPQ2fPostalQQfromZR2QQfsooZ2QQfsopZ2QQftrtZ1QQftrvZ1QQftsZ2QQlopgZQQsacatZ182QQsadisZ200QQsaprchiZQQsaprcloZQQsargnZQ2d1QQsaslcZ2QQsbrftogZ1QQsofocusZbs

3614.

Solve : send the response of telnet to a file?

Answer»

Hi, I'm new in this forum, it's excellent !
In FIRST time, excuse me for my english, maybe isn't very good.
Now the question:

When I connect to a DAYTIME server:

telnet time-a.nist.gov 13

I RECEIVE the response:

53771 06-02-05 17:17:26 00 0 0 373.1 UTC(NIST) *

I need to send this information to a file. Solution seems easy:

telnet time-a.nist.gov 13 > hora.txt

And use it to change the hour in my computer:

for /f "tokens=3" %X in (hora.txt) do echo %X | time

(I know, I know, I can use NTP or SNTP, that is not the question).

But don't work, the file hora.txt stay empty. Why? :-? :-? :-?

I set the LOCAL_ECHO to ON:

C:\>telnet
Microsoft Telnet> display
EL carácter de escape es "CTRL++"
Se autenticará (autenticación NTLM)
LOCAL_ECHO habilitado (ON)
Enviar ambos CR y LF
Se negociará el tipo de terminal
Terminal preferido: ANSI

but nothing.

I'm use W2000 and W2000 Server. ¿Could any help me?

-many thanks-Telnet sets up a new environment within the command shell and was never meant to be scripted in Windows.

telnet -f time.txt time-a.nist.gov 13

will create a file (time.txt) with the information you need, but you still have to manually hit enter in order for a batch file to proceed. If you use redirection or a filter, the commands will not be passed from one environment to the other.

Good luck. 8-)ups! I read the documentation of W2000 Proffesional, but not of W. Server [smiley=rolleyes.gif]

It don't works in w2000 proff. but it serves to me.

[smiley=dankk2.gif]

3615.

Solve : datestamp YYMMDD?

Answer»

I want to rename a file from file.log to file_YYMMDD.log

i currently have this bat script but it only renames file.log to file_MMDDYYY.log. any idea how to GET YYMMDD?

here's the code that I have.

REM --- Go to the directory of the file to rename
cd D:

@Echo OFF
TITLE DateName
REM DateName.CMD
REM takes a filename as FileName.log and renames as FileName_MMDDYYYYHHMM.log
REM
REM -------------------------------------------------------------
IF FileName.log.==. GoTo USAGE
Set CURRDATE=%TEMP%\CURRDATE.TMP

DATE /T > %CURRDATE%

Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET MMDDYYYY=%%J%%k%%l

Echo RENAME FileName.log FileName_%MMDDYYYY%.log
RENAME FileName.log FileName_%MMDDYYYY%.log
GoTo END

:USAGE
Echo Usage: DateName filename
Echo Renames filename to filename_MMDDYYYY
GoTo END

:END
change the order of variables:

For /F %PARSEARG% %%i in (%CURRDATE%) Do SET MMDDYYYY=%%l%%j%%kyup. im geting 20060206 (YYYYMMDD) i need 060206 (YYMMDD) instead. is there a way to PARSE 2006 to just 06?Yes, add one new line:

For /F %PARSEARG% %%i in (%CURRDATE%) Do SET MMDDYYYY=%%l%%j%%k
SET MMDDYYYY=%MMDDYYYY:~-6%thanks carlos. it WORKED!

3616.

Solve : Printing to notepad?

Answer»

Really new at this. My problem is that I want to print out in notepad, the results of the systeminfo command. I can create a very SHORT bat file that runs the command, but I would LIKE the output to go to a txt file so it can be printed, reviewed or emailed. The reason for this is that I have to maintain updates for about 20 laptops and FIND that the system info command is a great way to review the updates that have already been applied to the laptops. Having the info in a text file would be handy for myself and others who use the laptops. ThanksIf you want to see it in notepad, first SEND to a file:

systeminfo > info.txt && notepad info.txt

For printer:

notepad /P info.txt

3617.

Solve : searching?

Answer» HI,

Does anyone KNOW how to search for files that were created on the current date?

Thanks.Can you not use the search function in Windows? The advanced options screen lets you use date created as a search criteria.

In batch, this LITTLE diddy might help you out:
Code: [Select]
@ECHO off
for /f "tokens=6" %%a in ('echo. ^| date') do (set arg=%%a)
dir /tc /s /a:-d | find "%arg%"


The code is set for the current directory and below. You can expand this by using a path and some wildcards.

3618.

Solve : pausing batch file while app running?

Answer»

Hi there
I am writing a small Java APP which executes a batch file. The idea was to open a antispyware app then scan and fix errors, once that was finished do the same with antivirus app and so on. I'm doing this so my slightly computer illiterate FAMILY can just click a button when ever they FEEL the computer is slow and all these tasks will take care of them selves.

Is there a way to test if a program is runinng from either a batch file or command line. eg. so that when the spyware is scanning the FOLLOWING instructions will WAIT.

ThanksIn a batch file, you can use the CALL statement which will transfer control to your app and wait until it completes before continuing with the next statement.

call antispyware.exe
call antivirus.exe

When running external apps, most languages have a mechanism to implement the same functions as a CALL although it varies from language to language.

Hope this helps. That sounds exactly like the function I'm looking for, I didn't relize thats the way CALL worked.

Thanks

3619.

Solve : Delete variables?

Answer»

Hey everyone I am making a sort of multi pupose batch file and one of the abilities it has is gonna be to delete things.
I ahve tried the script below but whatever the user inputs to the batch it says it cant file the file specified
here is the code:

echo (Note) There is no comfirmation dialog so MAKE SURE you are careful!
echo Which file do you want to delete? (Pathname and extension included)
SET /p DelFile=
del %DelFile%
pause
cls
echo File deleted!
Echo.
echo 1) Delete another File.
echo 2) Main Menu
Echo.

set /p ans=%1
if "%ans%"=="1" GOTO:Del2
if "%ans%"=="2" GOTO:Menu

can anyone help?I was able to clean this up a BIT, but you have no labels for your goto statements and you should have a default for your menu (what if a user chooses option 4?)

Code: [Select]
@echo off
echo (Note) There is no comfirmation dialog so MAKE SURE you are careful!
set /p DelFile=Which file do you want to delete? (Pathname and extension included):
del %DelFile%
cls
echo File deleted!
Echo.
echo 1) Delete another File.
echo 2) Main Menu
Echo.

set /p ans=Enter Option
if "%ans%"=="1" GOTO del2
if "%ans%"=="2" GOTO Menu


You should be able to fix the rest of it. Thanks very much for the help and quick reply but it still says that the system cannot find the path specified even tho I am 99% sure ive put it in correctly.Do you know what could be causing this?
(btw the code i posted before was only a small section of the batch file)The DEL command is straightforward. It's more likely you're trying to delete a file that doesn't exist. Create a DUMMY file and use your batch file to delete it.

BTW: you'll get a "File Deleted!" message whether the DEL is successful or not. Coding batch FILES is a lot like driving...you have to be defensive.

3620.

Solve : DOS Close button greyed out??

Answer»

Hi Everybody,

I SEARCHED everywhere and find no answer to my question.

Is it POSSIBLE to grey out the CLOSE BUTTON of a dos prompt? so that users cannot interfere with the RUNNING batchfile.

Thanks in advance,

3621.

Solve : Re: 2k_dummy, Merlin_2?

Answer»

2k I stand corrected, blackberry asked for os.
YOU asked what commands don't work. I had them in original post.

Thanks Merlin_2 for your interest.

Here's orginal post:

files missing/corrupt? can't make dos boot disk
« on: Dec 2nd, 2005, 12:27am » Quote Modify Remove

--------------------------------------------------------------------------------
Hi,

I was GIVEN an older 'puter from my friend for the purpose of playing older games like Kings Quest 6 (cd)

It has windows 95 and I don't know what ver. of dos.

I installed the game in dos, but when I went to play it gave message: not enough memory if you have any resident software, please remove and try again (i did this & that didn't help)

I decided to make a boot disk and I followed the directions from this WEBSITE.
it went ok... till I got to the, copy himem*.* a
it said file not found
also
copy emm.386*.* a: file not found
also mouse.com/or sys not found.

I then tried re-install game as it gives option to make a bootable disk from there and got the error message
can't find doublespace.sys

what can I do? I can't tell what version of ms dos is there because when I go to c:\ver it tell me I have windows 95 4.00

Do I have corrupt/missing files? Is there away to correct this.
How do I find out what version of dos I have?

I don't have any of the software that's in 'puter, but I do have a brand new version someone gave me of dos 6.22., although I would rather fix (if possible) whatever is wrong with the one that in there

Can I install that over whatever version I have in the computer?
I've never done ANYTHING like that is it pretty easy?

please advise,Do you have the win 95cdrom disk?

Confused.....as 6.22 is win3.1

when your pc boots what does the screen display on boot........win95 or do you have type in win....

And why has the boot ini file been edited......

what does it read........?list boot init file....The "not enough memory" message can mean one of two things:

1. You really don't have enough memory

2. Your config.sys is not properly set up

How much memory do you actually have? Can you post the contents of the config.sys file?You do not have a standalone DOS on there, you have Windows 95. You cannot reload an older of version of DOS once Windows 95 is on there. You are probably just dumping into a DOS shell from Windows 95 which has limitations, as you have found out.

If you reload DOS, then Windows 95 there is a chance IF you have DOS drivers for your sound card. You can do memory management, etc. much easier in plain DOS with Memmaker than whatever you are trying. You can also make a DOS boot disk with real DOS to use just for playing games, but your partition size may be a factor as well as the file system you are using (FAT32 vs. FAT16).




Answer to merlin question.

No as I said in my post.... 'puter was given to me with no software. I guess I'll have to find a copy of 95.

Thanks for all the help everyone!Thanks everyone all the help, but I guess I need a copy of win 95 to fix my problem.I would also look for a copy of Dos 6.2 if you want to use that as a Dos gaming machine...
Check University bookstores and or Computer Shows in your area...

patio.

3622.

Solve : Repeated executing of Commands?

Answer»

Hi all ,

I just want to EXECUTE the command " pslist -m WINWORD>>Memory.txt" For n number of times with a delay of n secs. Can anybody provide me a smart solution for this.

Command execution was succesfull for one time.


thanks
venki Without an OS no DEFINITIVE answer can be given, but this might work on your MACHINE:

Code: [Select]
@echo off
set x=0
:loop
pslist -m WINWORD>>Memory.txt
ping -n 3 127.0.0.1 > nul
set /a x=x+1
if %x% lss 5 goto loop


Code is set to run five times with 2 second DELAYS. You can change to your hearts content.

3623.

Solve : Protect the *.bat file?

Answer»

Hi GUYS,

Here is my problem :

I WOULD KEEP my file.bat under a password protection,
for avoid people to open it and modify it, but at the same time it has to be usable from everyone.

I hope you can help me
Thank
Riccardoyou can't protect a batch file with an password, or you would NEED an external coder and decoder program, so nobody can reed it, but the problem is, nobody can open it to (without knowing the password).

Solution, compile your batch to exe's or .com's.
a program that you can try is: quick batch file compiler
link: http://www.softpedia.com/get/Programming/Coding-languages-Compilers/Quick-Batch-File-Compiler.shtml


greetz

blackberry Hi BlackB

Thanks for your TIP, it is a good idea thanks

Ric

3624.

Solve : Moveing files from undefined user folder?

Answer»

Hi,

I am trying to create a batch file to run on our network to MOVE a particular shortcut from a local users desktop to the all users desktop file.

This is what I have so FAR:

move "C:\DOCUMENTS and Settings\[glb]AFearnle[/glb]\Desktop\PCS50.xls" "C:\Documents and Settings\All users\Desktop"

pause

But I need the command to search all user FILES in the Documents and Settings folder for the file specified and then if the file is found, move it.

I tried using the wildcard *
but to no avail.

any suggestions?

THANKS in advance

Adam

3625.

Solve : Close CDROM...?

Answer» Hello Friends,
I want close CDROM with VBS FILE if anyone can do it plz., HELP me.....Tahnks very much....!!!
The Windows Media Player can be scripted to open the drawer but not close it. There are programs floating around the net that claim to close it but BEWARE, they usually come loaded with nasties.

If this is for accessibility, you might be able to find a Windows API. My desktop closes all the DRAWERS during a boot but not the LAPTOP. This may be device specific.

Good luck.

3626.

Solve : MS DOS FULL SCREEN FREEZE?

Answer»

I formatted my disk YESTERDAY and ran windows update but I cannot get DOS to function in FULL screen mode.

If I hit RUN - EDIT, edit.com is loaded in small WINDOW. Then ALT-ENTER brings it full screen but now it's frozen (keyboard-mouse). With ALT-ENTER again it becomes small but stays frozen and I have to close it with "X".

In SAFE mode it works with no problem so it looks like a driver issue, but I can't figure it.

I have to work with msdos to update some programs and it is "slave labour" raised to cube, if I have to work with small window.

3627.

Solve : C: to D:?

Answer»

for some reason i cant copy my C drive to my D drive, i have done it on 98 but now that i have XP it seams i cant do it. Just posted to see if anyone COULD help me.Quote

Just posted to see if anyone could help me.



lol, YES somebody cananswer, if windows is installed on the "c" drive, it is impossible to copy it, because it is in use.... BTW if you want to TAKE a BACKUP from your computer just use norton ghost or somethingSorry hiei1282, I have to leave for work but some real help will come for you shortly.
3628.

Solve : deleting temporary files and history files?

Answer»

can anyone tell me how to delete these files using rmdir command?I KNOW that the rmdir command replaces the deltree command for XP and2000.little help!I suggest you use the del command to delete files. rmdir (aka as rd) is used to delete folders and their subfolders with the addition of the /s switch in W2K and XP.

Using either command with WILDCARDS can disable a perfectly good system.

Please specify what TEMP files you're referring to. There is more than one temp directory on a Windows system.

Let US know. Hello,
You must do that!
Start-Run-Cmd
copy con temp.bat
del /f /q /s C:\*.tmp
del /f /q /s D:\*.tmp
And when you will run these program your temp files will be deleted automatic.
my OS is win xp and I am concerned with temporary files that clutter up my system,stuff from the internet .Pretty much any temporary file that can be safely deleted.thanks for the response.Try http://www.ccleaner.comFED thanks for the ccleaner fix.Its one heck of a friendly program.thanks again MRYou're welcome Michael, don't you just love it when they run like a clock.

3629.

Solve : Features?

Answer»

hi can someone tell me at 5 FEATURES of MS-DOS please help me because i can't find them anywhere. hi Luca,

SURE, i can tell you one :

It is black and white

...ehehehh, sorry i was just kidding

CIAO,
Riccardo
Yeah, one of the most IMPORTANT feature who hates racism

Here is encyclopedic information on this.
http://en.wikipedia.org/wiki/MS-DOS

But if you ask for commands / features.
May find here: http://www.textfiles.com/hacking/MICROSOFT/dosundoc.txt

http://users.cybercity.dk/~bse26236/batutil/help/DRV.HTM

3630.

Solve : Dos on windows?

Answer» NEED to install program onto laptop using windows..HOWEVER the program is in dos ..Can this be DONE and if so How...What VER. of Windows ? ?
3631.

Solve : Dinosaur?

Answer»

Download a boot disk>http://www.bootdisk.com/bootdisk.htm

Load it......at a the a:\> copy sys:

Cannot REMEMBER the cmd......The HDD should have a label on the top which should tell you it's capacity. If all else FAILS visit the manuf. SITE and do a search by MODEL #

patio. Hi, thanks for that info, I will try this tomorrow.
Greg

3632.

Solve : send a .txt file from a batch to mail box?

Answer»

Hi Guys,

Is it possible send a .txt file to a mail box (and then sen it with outlook) directly from a BATCH file?

Thaks,
CIAO
RiccardoThere are probably 3rd party products that will let you do this from a batch file (try googling for them) otherwise you can use a script:

Code: [Select]
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "youremailaddress.com"
objEmail.To = "recipientsmailaddress.com"
objEmail.Subject = "subject"
objEmail.Textbody = "Body"
objEmail.AddAttachment "attachfilename"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configurati
on/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configurati
on/smtpserver") = "yourmailserver"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configurati
on/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send


In the from parameter, put your email address. In the to parameter, list the addresses of who you're sending the email. Separate with semi-colons if multiple addresses. In subject and body put anything appropriate. In the attachments parameter put the path and file name of your file. In the smtpserver parameter, put your email servername. You may have to check with your ISP for this info, although most ISP's have this info on their web sites. Do not change the rest of the parameters.

Save the file with a VBS extension and run from the command line as cscript scriptname.vbs

Good luck.

This question has been asked and answered numerous times before. Please research your question before posting.Thanks SideW

I'll try.

thake care
RiccardoSideW, or who want to help,

What if i try to call the Vbs script with the "call" command from the batch file?

thanks,

Riccardoif the script is correct, that should work... (the call command) how to use it

call [drive][directory]
example: c:/test.vbsHi SideW

When i run the script i got an error like this:

*.vbs(7, 82) Microsoft VBSCRIPT Compilation Error: string without termination.

What can it be?

Ciao
RiccardoApparently you ran into a limitation of the forum. Some of the lines you see as two lines were written and need to be just one line unless you use continuation.

All lines preceeded by: objEmail.Configuration.Fields.Item (and followed by another line) need to be one line in your editor.

Hope this helps. Ciao SideW,

Yes you were right, actually i found it few second after i posted it.... sorry for bother you for such a stupid thing.

but now when i run it i have this error msg:

*.vbs(6, 1) CDO.Message.1: the specified protocol is unknow


This is the 6TH line :
objEmail.AddAttachment "ciao_12.txt"

For wich reason should be the protocol Unknow?

Ciao
RicYou need to use a fully qualified file name for the attachment.

Example: "drive:\dir1\dir2\ciao_12.txt"

Hope this helps. ...getting closer,

Yuor last tip worked, but now look at this, it seems like the mail server doesn't GET the command :

*.vsb (11,1) (null): the message could not been sent to the SMTP server.
0217. the server response was not available

ciao
RicYou may have missed the instructions that went along with the code:
Quote

In the from parameter, put your email address. In the to parameter, list the addresses of who you're sending the email. Separate with semi-colons if multiple addresses. In subject and body put anything appropriate. In the attachments parameter put the path and file name of your file. In the smtpserver parameter, put your email servername. You may have to check with your ISP for this info, although most ISP's have this info on their web sites. Do not change the rest of the parameters.

You didn't post your script so my guess is that the smtpserver parameter is in error. Do you host your own email? If you do check with your network administrator or else you may have to check with your ISP for details.

3633.

Solve : Uninstalling Software using BAT file?

Answer»

I know this has got to be possible, but haven't had any luck getting it to work. I want to uninstall the software, start a reboot, and if possible restart the BAT file. Any ideas? I need this to be compatible with WIN2000 and XP.Uninstalling software can be as simple as deleting a few directories to such complex ACTIONS as REMOVING registry keys, directories, and shortcuts.

If the software has an uninstall feature use that. See what would run if you clicked it (right click then Properties) and put the same info in a batch file. Another possibilty is to use msiexec with the /x switch in which case you would need to know the application's GUID from when it was installed. Another possibility is to use the application's install log as a guide to reversing all the actions.

Restarting the system is the easy part: shutdown -r

As for the restarting the batch file, you can use 1 of 7 RunOnce registry keys or you could copy the batch file to the Startup directory prior to running the re-boot. You would need some mechanism to DETERMINE that the app had already been removed to pick up the code somewhere beyond the re-boot.

3634.

Solve : Renaming folders?

Answer»

I'm jsut wondering if you could rename a FOLDER automatically with a DATE appended to the folder name.
thanks to anyone who respondsAn OS would be a good thing to know about now. Renaming a folder is no different than renaming a file. You can USE a batch file or a script or even do it (brace yourself) manually.

Nothing really happens automatically in a computer. Most OSes are EVENT DRIVEN. What do you mean by automatically?

Let us know your OS.

3635.

Solve : How can I restart computer after every 5 mins?

Answer» How can I CREATE a batc file, It can be restart computer each 5 mins an It`ll be hidden when it works??..... This sounds malicious. I'll pass. Kanan, you'll hardly have an ANSWER on this thread.
Is this your problem or you want to cause problem?

Be frank.

and not evil.you wan't to make a VIRUS, but you just wan't to say it on another way, so it don't sounds like you wan't to make a virus... we aren't stupid....Windows XP:
@ECHO off
sleep 300
shutdown -r -t 00

put it in startup folder
3636.

Solve : why do dos commands not work @ c:\ prompt?

Answer»

Please SEE earlier THREADS (can't make dos boot disks)

Does it mean dos files are corrupted?
Are you using DOS or some version of Windows? If the latter, it will never work. The other thread you started indicated Windows 98.what is your os...Which command(s) don't work? Are you using the proper syntax? What error message do you GET?C:\>set

check the %path%

ex:
path=c:\windows;c:\windows\command

3637.

Solve : .bat file that finds and replaces files?

Answer»

To all:

First-timer, here. Hope you can help me look good for my boss.

We want to create a batch file that searchs all the profiles on a workstation (in c:\documents and settings). And, if it ever finds a file named VersionA.exe, we want to replace it with a file named VersionB.exe.

Any hints/tips? All help WOULD be greatly appreciated. Thx in advance, - Cliff

p.s. I did "search" this forum. Is there, by chance, a library of some .bat files I can explore. I love DISSECTING examples.Code: [Select]for /d %%a in ("c:\documents and settings\*") do (
if exist %%a\versionA.exe copy path\versionB.exe %%a\versionA.exe
)

You'll NEED to replace path with something meaningful. I'm not sure you can get into other user's accounts, but that's a whole other animal.

Good luck. 8-)

3638.

Solve : Problem, batch file -> USE NET at startup win98?

Answer»

Hello everybody,

I am new to the forum and I have been scanning the site and the forum for a solution for my problem but I could not find it. I saw however that some of U guys really know your stuff.

So here goes.
I am trying to write a batch file that runs the COMMAND NET USE LPT1: \\... each time the windows 98 I use start.
The command works fine if I write it directly in MS-DOS prompt.
If I write a batch file and run it, it run over and over again. The same thing happens if I call it from autoexec.bat and execute it.
My code is basically the line written before in the text. I tried with ECHO OFF and some other commands that are listed on this site with connection to the batch files.

I would like to do another thing I did not even tried. I would llike to copy a specified folder over the network to a specified location, when windows stops. If the code is not totally I dont expect the whole solution. But I sign in the right direction (a command to use) would be fantastic.

10X in advanceGoing to need some additional information for this one.

First, what is the full command you're running that is causing this ISSUE, you only seemed to list the first part of the command.

Second it sounds as if you say that when you run this command it's causing a loop is there more to this batch file that you have or is it just this one line that you're running that is causing it to loop?Hello,

Basically that line is the whole of my code. As I am totally new to this I dont know what other lines to add. Like I said I tried with to use ECHO OFF or to to put the command in between a :BEGIN and an :END itd. I am sure I am forgetting to add something totally basic to the code in order to work fine.
I guess I need to work on the basics more the get the feel how writing batch files works.
So if I run the batch file with only the code NET USE LPT1: \\NETWORKCOMP\PRINTER the MS-DOS prompt appears and the line is running (appearing in the prompt) over and over agian until I close the whole thing. The call from autoexec.bet seems to work fine as the same thing happens when restarting the computer, only this time appearing on the whole screen and preventing the windows to start.

Hope my discription is precise enough.

CheersHmm still unable to duplicate the issue. I imagine that it is not the command that is causing your issue but the actual batch file you're running. Can you post the complete batch file you're attempting to use?My batch file attached.
You probably won't get any takers on the .zip file. Try posting the batch file in plain text.10x for teh tip:

The whole code:

NET USE LPT1: \\AMD\HP

Thats all

I probably need some support code - but what??If that's the only code in your batch file, then there is nothing to cause a loop. Either it will run or you will get an error MESSAGE concerning an UNKNOWN network or a unknown resource. What INDICATES you're in a loop? Is the network name and resource defined to the system?

Let us know. 8-)Quote

command in between a :BEGIN and an :END

You mentioned the above quote in one of your above messages. To me this sounds as if you've got some type of goto and/or other loop situation going. This line alone should not be causing any type of loop situation.hello all
I was just experimenting with :BEGIN and an :END, because my line keeps repeatng itself. And it did not help.

Sidewinder: If I type the command in MS-DOS prompt it is executed without a problem.
Some additional info:
If I run the batch file from my win 98 the MS-DOS prompt window opens and then the line runs over and over again.

I also tried something else:
I wrote the file as follows:
PAUSE
NET USE LPT1: \\NETCOMP\PRINTER

now when I run my file I am first asked to press a button to continue as the pause command is executed. When I press sth. my second line is written and the again the PAUSE command stops the execution.

Hope this helps...There are two ways to create a loop in a batch file. One is a goto which you obviously don't have. The other is recursion where a batch file calls itself. Since you claim that the two lines you posted are the only lines in your batch file and not part of larger batch file, I can only see a loop being created if your batch file is named net.bat

Just a thought. 8-)

PS. I searched for viruses that attack the command prompt and found none!Sidewinder you got it !!!!!!

The batch file was calling itself !!!!! Thats why it looped
What a stupid mistake on my part...

10x a lot to everybody for the help, specially sidewinder
Good thinking Sidewinder!
3639.

Solve : Ms Dos Shutdown?

Answer»

Hey, I tried to use the shutdown code
shutdown /m \\[computer], but it will not work on my network, is there something specific i must do???Are you using REAL DOS or some version of command prompt?Im usind the prompt of winxpJust for the record that's not MS-DOS.Yeh..Well, if you're only trying to shut down one computer (not the network) It would be shutdown -s, but you would also need to have administrative priviledges to do it.What i ment was ms dos prompt on WinXp.
But I thought I had to put the name or IP of the computer i wanna shutdown......
ANYWAYS, how could i GET priviledges to do so???, is it something i must do in the "Computer manage"
Or in the network??how are you doing it? Through cmd/command?
Why do you need to know anyway....?I go to run and then put cmd and it prompt me, and there i do it.
The reason is just no manage my network computers, to ease the entire MUTUAL shutdown.
Someone may want to confirm this but it depends on the type of network. If your PC is part of a domain, remote shutdown should work provided you have administrative credentials on the remote machine. If your PC is part of a WORKGROUP, you're SOL.

3640.

Solve : Trying for quite a while to cre8 a batch?

Answer»

Hey there..
1st of, im sorry for opening a new topic for this, i've tried using other topics to resolve my problem but w/ no luck.

my problem goes like this:
Everytime I delete the Temporary files FOLDER, when I get in a site which uses Shockwave flash PLUGIN, I need to reinstall it everytime.. I noticed a *.rar file related to Shockwave which is placed in the Temporary files folder, everytime it gets deleted Im required to reinstall shockwave plugin again.

So i tried resolving this by creating a command which will delete the content of Temporary Files except for the files w/ the *.rar extension.

I dont know if thats the best solution for the shockwave plugin problem, but that was the best i could come up with.

Thanks a lot for any help.does any1 know how to make a Batch file w/ this command:

"delete the content of Temporary Files folder except for the files w/ the *.rar extension."In the batch code, you can tell it to rename that folder which contains the data you want to delete, give it any name, then create a new folder with the name that the other folder had before, copy the file you dont wish to delete from the one folder to the other and then delete the folder w the weird name.
That should do.This little batch file will work (on some machines) as a workaround but not a solution:

Code: [Select]
@echo off
for /f %%a in ('dir /b "c:\Temporary files\*.*"') do (if not %%~xa==.rar del "c:\Temporary files\%%a")


Change Temporary Files to something valid on your machine.

When you install Shockwave, do you not have the OPTION of where to install it? It's rather strange it would install to a temp directory.

I applied the command to the batch file, changed the dir to: C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files

and it did nothing :\

I have absolutely no idea what to do now ...
I deleted the Temporary internet files directly via Internet Explorer >> Tools >> Internet Options

restarted my IE, and again.. the macromedia shockwave plugin installation pops-up.

I cant choose a destination folder for the installation since it installs the plugin automatically, after it has been installed, the plugin APPEARS in the Tools >> Internet options >> Programs >> Manage-Addons
list.Quote

and it did nothing :\
This is understandable if IE had already cleaned out the directory. IE is very unforgiving, there is no exception list, all files get deleted. The batch code was just a workaround anyway.

Suggestion.

In the IE addon manager disable Shockwave
Download Shockwave and install to the directory of your choice.
Restart IE

Let us know how you make out. Quote
does any1 know how to make a Batch file w/ this command:

"delete the content of Temporary Files folder except for the files w/ the *.rar extension."


lol iNc0g-VergiB, you just posted it twice but under ANOTHER nameYa i just re-phrased it , just incase there're slow-witted ppl here :]

no offence or anything..
3641.

Solve : Question about dos?

Answer»

How do I change the folder in dos?Just a little more info on what you are attempting to accomplish and someone should be along shortly to assist...How do I get from c:\ into a certain directory? cd \thatdirectory and press enterAlso at the same command prompt you can type dir /p which will show all directories on that drive alphabetically...use the SPACEBAR to scroll down through the list.thanks GX1 MAN how we doin today ? ?Doin' good, Patio. I suggested you drop by on ANOTHER topic (sorry don't REMEMBER which) regarding the Sony CD fiasco. You and I feel the same about that deal.

3642.

Solve : How to backup a file automatically?

Answer»

Is there a WAY I can BACKUP a file automatically, say once a day? I was thinking I could use Windows XP Scheduler with a batch file. The batch file would copy and rename the file including the date. Any SUGGESTIONS where to start?First are u familiar creating any batch file?This batch file will rename, append the date and copy a file.

Code: [Select]
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do SET today=%%c%%a%%b
copy drive:\path\filenameA.ext drive:\path\filenameB-%today%.ext

Note: the date is formatted YYYYMMDD. Flip the variables if you want SOMETHING different.

Change drive, path, filenameA, filenameB and ext to something valid.

Once you've tested the batch file from the command line and all is well, open up the task scheduler and schedule the job.

Good luck. Thanks, worked like a charm. Here's the code for others to use. Becareful not to put a space on the end of the first line.

for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set today=%%c%%a%%b
copy C:\progra~1\SageTV\SageTV\Wiz.bin C:\progra~1\SageTV\SageTV\wiz-%today%.bin
copy C:\progra~1\SageTV\SageTV\Sage.properties C:\progra~1\SageTV\SageTV\Sage-%today%.properties

3643.

Solve : Expiry date...?

Answer»

Hi... NEWBIE here.

I writing a simple BATCH to call for an action on or after a specify date.

The day and month did work, but once the year is change, the batch doesn't work anymore.

any suggestion?

Btw... is in MS dos.

Quote

@echo off
PATH=C:\


IF "%date%" LEQ "11/12/2005" (
GOTO 1
) ELSE (
GOTO 2
)

:1
Echo Expired...
pause
goto END

:2
Echo Not Expired Yet!
pause
goto END

Pause

:END
Quote
Hi... Newbie here.

I writing a simple batch to call for an action on or after a specify date.

The day and month did work, but once the year is change, the batch doesn't work anymore.

any suggestion?

Btw... is in MS dos.



sorry... i tested, only the DAY can work...
Your code certainly doesn't look like it's running on a MS-DOS machine. In any case when dealing with date comparisons, it is advisable to have them formatted YYYYMMDD.

Code: [Select]
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set today=%%c%%a%%b
if "%today%" leq "20051211" (
GOTO 1
) ELSE (
GOTO 2
)


I couldn't tell if your date format is MM/DD/YYYY or DD/MM/YYYY. If I goofed it, reverse the %%a and %%b variables at the end of the first line.

Hope this helps. Quote
Your code certainly doesn't look like it's running on a MS-DOS machine. In any case when dealing with date comparisons, it is advisable to have them formatted YYYYMMDD.

Code: [Select]for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set today=%%c%%a%%b
if "%today%" leq "20051211" (
GOTO 1
) ELSE (
GOTO 2
)

I couldn't tell if your date format is MM/DD/YYYY or DD/MM/YYYY. If I goofed it, reverse the %%a and %%b variables at the end of the first line.

Hope this helps.



ya Sidewinder, i already got the solution and it is actually the same as what u have quoted.

But i still dun understand how the below function work...
"for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set today=%%c%%a%%b"

Thank a lot pal...
3644.

Solve : If statement doesn't work properly??

Answer»

Dear all, I'm trying to write a batch to remove a subfolder with file of 8 days old.

However, I realised whenever ":ChangeMonth" is invoked, it doesn't run properly.

Example:
I set system date to 9 Dec 2005, it runs properly (delete file-20051202 in C:\Test).
But when I set system date to 7 Dec 2005, it didn't delete file-20051130 in C:\Test.

Pls kindly help.. The following is a SAMPLE of my codes. Your help will be greatly APPRECIATED. Thank you so much.


SET DayS=%date:~7,2%

:: strip leading zero from Day
IF %date:~7,1%==0 SET DayS=%date:~8,1%

SET YY=%date:~10,4%

:: if day is in 1st-7th of month, invoke ChangeMonth
IF %DayS:~0% LSS 8 CALL :ChangeMonth
IF NOT %DayS:~0% LSS 8 CALL :SameMonth

:: add leading zero to variable DD if it is less than 10
IF %DD:~0% LSS 10 SET DD=0%DD:~0%

:: set date of 1 week back to be in YYYYMMDD format
SET SortDate=%YY:~0%%MM:~0%%DD:~0%

:: remove directory and file
IF Exist C:\Test\file-%SortDate% (rd /S /Q C:\Test\file-%SortDate%)

:SameMonth
SET /A DD=%DayS:~0%-7
SET MM=%date:~4,2%
GOTO:EOF

:ChangeMonth
IF %date:~4,2%==01 (
SET /A DD=31-(7-%DayS:~0%)
SET MM=12
SET /A YY=%YY:~0%-1
)

... etc


IF %date:~4,2%==12 (
SET /A DD=30-(7-%DayS:~0%)
IF %date:~4,2%==12 SET MM=11
)
GOTO:EOFQuotes are needed when you use grouping on the SET statement.

Code: [Select]
IF %date:~4,2%==01 (
SET /A DD="31-(7-%DayS:~0%)"
SET MM=12
SET /A YY=%YY:~0%-1
)


Try using concatenation to replace the block IF's:

Code: [Select]
IF %date:~4,2%==01 (SET /A DD="31-(7-%DayS:~0%)" & SET MM=12 & SET /A YY=%YY:~0%-1)


Also, why the nested IF for December? Should not December be like any other month?

Code: [Select]
IF %date:~4,2%==12 (SET /A DD="30-(7-%DayS:~0%)" & SET MM=11)


From your use of batch language, I'm guessing you have either XP or Win2K. Next time consider using a Scripting SOLUTION. You'll find it a better tool for the job.

Good luck. Thanks alot Sidewinder. It works correctly now. Yup, the nested IF statement is redundant. I was doing some testing here and there and I FORGOT to remove it. Thanks so much for your help! =D

3645.

Solve : want IP.(value) return?

Answer»

Exam :
When I ping to ip address 10.19.19.19
then normal answord :
Reply from 10.19.19.19 : byte=32 time=40ms TTL=64

but I RECEIVE value
Reply from 10.19.0.1 : Destination host unreachable.

and i create bat file check that ip by OUTPUT follow:
"Connect 10.19.19.18 ... PASS."
"Connect 10.19.19.19 ... Fail."

but I want output are
"Connect 10.19.19.18 ... Pass."
"Connect 10.19.19.19 ... Fail. (reply from 10.19.0.1)"

so that i want ip value return get to description.
help me, thxs.batch file :
-------------------------------
ECHO OFF
SET IP1=%10.19.19.18
SET IP2=%10.19.19.19

PING %IP01% -n 1 | FIND "Reply from%IP01%" > NUL
IF NOT ERRORLEVEL 1 ECHO Connect 1)%IP01% ...Pass.
IF ERRORLEVEL 1 ECHO Connect 1)%IP01% ...Fail. (Reply from ................)

PING %IP02% -n 1 | FIND "Reply from%IP02%" > NUL
IF NOT ERRORLEVEL 1 ECHO Connect 1)%IP02% ...Pass.
IF ERRORLEVEL 1 ECHO Connect 2)%IP02% ...Fail. (Reply from ................)

font red , I want value return.Code: [Select]
ECHO OFF
SET IP1=10.19.19.18
SET IP2=10.19.19.19

PING %IP01% -n 1 | FIND "Reply from%IP1%" > NUL
IF NOT ERRORLEVEL 1 ECHO Connect 1)%IP1% ...Pass.
IF ERRORLEVEL 1 ECHO Connect 1)%IP1% ...Fail. (Reply from %IP1%)

PING %IP02% -n 1 | FIND "Reply from%IP2%" > NUL
IF NOT ERRORLEVEL 1 ECHO Connect 1)%IP2% ...Pass.
IF ERRORLEVEL 1 ECHO Connect 2)%IP2% ...Fail. (Reply from %IP2%)


You defined IP1 and IP2 in the SET statements. You referenced them as IP01 and IP02 in the rest of the code.

Of course I could be way off base, but sometimes it easier to start with the obvious. Oh.. I cann't do it. I have not DOS. basic.
I HOPE who suggest ways to do bat file are complete.
:'(

3646.

Solve : User Specific AUTOEXEC.bat?

Answer»

I have a quick question regarding the AUTOEXEC.bat file on my Windows XP COMPUTER. Currently on my computer there are 2 user profiles: USER1 and USER2. How would I set it up so that whenever USER2 logs on, a batch file:
(say ... PROMPT.cmd) would automatically run. Does each user have its own AUTOEXEC or does one AUTOEXEC govern all users?

If there is only 1 I can write an if statementfor it:

if %username%==USER2 (...)

Please help
Sigma

ps. both users have admin status.Actually there is none on a XP machine. XP uses the autoexec.nt file to initialize the MS-DOS ENVIRONMENT (16 bit subsystem). There is also a CMD environment (32 bit subsystem) which is initialized from the Windows settings.

Which one are you referring to? You can try using IF STATEMENTS in the autoexec.nt and see what happens. If it's only the prompt you're interested in, try right clicking the icon used to start the program and choose properties. For CMD change the Start in: entry; for MS-DOS change the Working: entry on the program tab.

Hope this helps.

PS. It may look like DOS, it may even quack like DOS, but it's not DOS. Just an emulated version thereof.Quote

It may look like DOS, it may even quack like DOS, but it's not DOS. Just an emulated version thereof.


People just don't seem to grasp this concept do they?I VOTE we start a "COMMAND Prompt" sub-forum...
3647.

Solve : How to echo greek letters??

Answer»

I wrote a batch file which saves the FILES from a floppy to a specific dir, then fromats the floppy and then it copy the files back. My problem is that this is a batch file to be used by people who doesn't understand english and i want to ECHO my messages into Greek. I am AWARE of the cmd /u command but i can't make it work PROPERLY.

COULD anyone help me with this?

I run batch files throught WinXP

3648.

Solve : dos game wont play w/ windows ME??

Answer»

My computer came from a company called Union FRIENDLY Systems. I have a 63MB hard drive, and as far as video and sound cards, I have no idea, but if you tell me how to find them I will RETURN with the answers. I have windows ME and I have a game the runs in dos (the 7th guest). I thought I had installed it correctly using ms dos prompt. But when the game loads to the menu screen (an ouija board) the screen and music freeze. Also, when it freezes the only way I can GET back out is to ALT cntrl del. Is ME just not compatible with dos games? Can ANYONE help?

3649.

Solve : creating a dos batch file?

Answer»

I am TRYING to create a dos batch FILE in Version 5.1.2600 to do the following.

My file structure is like this...

c:\Program Files\AR System\HOME6

I want to delete all files/folders under HOME6 except for files with extensions *.iniI only have files with .ini extensions that I do not want to delete. Where do I add the paths? Is it after 'dir..?Code: [Select]
@echo off
for /f %%a in ('dir /b "c:\Program Files\AR System\HOME6\*.*"') do (if not %%~xa==.ini del "c:\Program Files\AR System\HOME6\%%a")


It's pretty much like you thought. Good luck. This works nicely however one last thing. Now that the files are deleted, is it possible to also delete the directory under HOME6?
c:
\Program Files
\AR System
\HOME6
\FOCxC001
\FOCxGrou
\FOCxJOIN
\FOCxSLAx

After I run the above command the 4 directories under HOME6 are now empty and I would like to delete them. There could hundreads of directories to delete...

tksIf I understand this correctly, you've deleted the files (except for .ini files) from the Home6 directory. Now you want to delete all the subfolders from Home6?

This shoud HELP you out:

Code: [Select]
for /d %%a in ('dir /b "c:\Program Files\AR System\HOME6\*.*"') do rd /s /q %%a


RD with the /s switch is very DESTRUCTIVE. All files in the subfolders will be deleted along with the parent directory.

Use CAUTION.

Hope this helps.

The RD command has been very popular this week. Maybe we should run a special like the FOR special we had a few weeks ago.So now my batch file looks like this...

@echo off
for /f %%a in ('dir /b "c:\Program Files\AR System\HOME6\*.*"') do (if not %%~xa==.ini del "c:\Program Files\AR System\HOME6\%%a")
for /d %%a in ('dir /b "c:\Program Files\AR System\HOME6\*.*"') do rd /s /q %%a

Is this good? When I run it, I always get prompted "Are you Sure?" Can this be removed? Also, it still does not remove the directories.

tksI probably should have READ some of Sidewinder's old posts. I guess some days are better than others.

This should work:

Code: [Select]
@echo off
for /f %%a in ('dir /b "c:\Program Files\AR System\HOME6\*.*"') do (if not %%~xa==.ini del "c:\Program Files\AR System\HOME6\%%a")
for /d %%a in ("c:\Program Files\AR System\HOME6\*") do echo %%a


The above code will list the directories to be deleted. When you are satisfied everything is cool, replace echo with rd /s /q

The /q switch when used with the /s switch is supposed to eliminate the "Are You Sure?" prompt. I can't explain why it doesn't work on your machine.

Standard disclaimer: File and directories deleted thru scripts do not make a pit stop in the recycle bin on their way to dataland. Plan accordingly.

Good luck.

3650.

Solve : .Bat files?

Answer»

Does ANYONE KNOW how to create a .bat file that will copy specific files, and paste them into another directory when ACTIVATED?Copy is used for copy and paste operations. Move is used for cut and paste operations.

Type HELP copy or help move at the command prompt for FULL details.

If you need more assistance get back to us and be sure to mention your OS.