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.

6951.

Solve : DOS file size command?

Answer»

Is there a DOS command that will return a file's SIZE, ie NULL or something, which could be used for .bat logic conditioning?dir
displays files size and LOTS of other THINGS, so you would have to parse it somehow.


6952.

Solve : DOS COMMANDS PROBLEM?

Answer»

you TELL me its COMMANDS
shutdown
Restart
and Logoff also
in win98,win2000,and WINME, and winxp recpectily,
ThanksYou need script commands for these not DOS commands.
So you need to be running WSH(WINDOWS Scripting Host) or some similar scripting program.

I use AutoIt for tasks like this. HTTP://www.autoitscript.com/autoit3/index.php

6953.

Solve : Bad command or file name msg?

Answer»

i have a batch file with a FOR comman in it ang its WORKING properly. its just when i CONVERT it to .com using bat2exe utility i GOT the msg bad command or file name msg.. any idea whats wrong with it..

thanks.. and more power...
bobbyFrom what I could find out, bat2exe cannot convert all DOS commands. FOR is one of them. I was UNABLE to find a complete list.

Good luck.
i see. ANYWAY.. thanks... ill keep in touch...

6954.

Solve : command in Ms-Dos?

Answer»

Hi, I WANT to ask please how i can send a file on Ms-DosSend it where? By what MECHANISM?DEL is HANDY for SENDING it to the bit bucket!

6955.

Solve : 'help' is not regocnised as an internal..?

Answer»

My friend just asked me to help him with the 'ftp' command in dos. Being a bit rusty I started command.com and typed 'ftp', whereupon I got the 'ftp' is not recognised as an internal...'

Ok, I though, maybe I've forgotten. 'help' the same thing happens as with 'net' and 'net help' Is this a problem with my typing, or a problem with command.com /cmd.exe (tried both).

I have RECENTLY installed some STUFF which looks like it's done SOMETHING, because its UPDATES some of the things displayed using 'set'.

Thanks in advance for any help,

GeoffVerrrrrrrrrrrrry Interesting............

It sounds like someone or something has replaced your command interpreter with one of their own. Guess it is time for a good deep virus scan and/or a system restore.

I would be interested, however, in knowing what new ITEMS are showing up in 'set'

6956.

Solve : DOS memory issues??

Answer»

Basic system outline:

Windows 98 Second Edition
Pentium 4 @ 2.8ghz
2 x 256mb DDR ram

My current project has been building a Windows 98 SE machine so that I can run both 9x and DOS games in their native environment.
I know, I know, virtual machines and DOSBox. But that's no fun. It's the same reason I've got stacks of old video game consoles under a big CRT TV.

So far, the Windows side of things has been just fine.

DOS, on the other hand, has been giving me trouble.

I know next to nothing about the inner workings of DOS and have pretty much been bumbling my way through the blank autoexec.bat and config.sys provided with a clean install. Yet, through much luck and reading of tutorials, I managed to get the CD-ROM and Mouse working.

To celebrate, I popped in the CD version of Simcity 2000 for a test and fired up the installer in DOS, only to be greeted with a warning that the computer has only 1024kb installed memory, which isn't right at all. Got the same error when trying to run the DOS installer through Windows.
Tried Demolition Derby and, again, got a message about low memory. So something seems to be up.

I've been looking into XMS, EMS and all that wacky stuff, but it's making my head spin. I then found this basic config.sys layout that supposedly would work:

DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS


But nothing changed.

Really not sure what I'm missing here. I half expect that I'm asking the wrong questions.

If anyone has any suggestion for leads to follow, I'd be really grateful. To run Windows 98 the way it was meant to be, yhu have to have a real hardware system the meets the typical requirements for Windows 98 or 98SE.
Using a PC that far EXCEEDS the requirements is not a good idea.
Some older programs can not deal with higher CPU speed or huge memory size. Or LARGE Hard Drive space.
The authors never envisioned that huge memory sizes were coming soon. This creates a error when it tries to find the memory size. It is called 'truncation', which is another way of saying the value is not correctly computed. It is like using a calculator that can not display the digits on the left end of the display.

One of the reasons people use emulators is to replicate a virtual environment where the old program is working in its favorite environment.
So, you need to either:
A.) get a real old system with limited CPU speed and limited memory.
OR
B.) Use a DOS Box emulator that lets you set the pentameters.

Try this - you may get some errors as it steals memory from the video card and your hardware may not allow it.
These were from MSDOS config.sys that I used but I edited the Windows folder where it was c:\dos

Code: [Select]DEVICE=C:\WINDOWS\HIMEM.SYS /testmem:off
DEVICE=C:\WINDOWS\EMM386.EXE min=0 ram auto x=c800-cbff D=48
DOS=HIGH,UMB

and if that does fail then try this

Code: [Select]DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE ram auto
DOS=HIGH,UMB
There will be the CDROM drivers and any other items that can be loaded high with the DEVICEHIGH= and LH commands , but it's a juggling exercise when you have a lot of drivers.

As an example: some drivers need more RAM to initialise themselves, and then settle into a smaller ram footprint to run - and these need to be loaded first so they don't fail saying "out of memory".
You also have different blocks of high memory and you have to force the various drivers to load in a certain order to load them all into high memory, depending on their ram usage.

That was the MSDOS days!
There was an automated memory management tool in MSDOS called Memmaker but I did it all manually, coz I was a geek.

In Win98 you won't use all those drivers and TSRs that we found useful in a plain MSDOS machine, so see how you go with the above info.

It occurs to me also that EMM386 fails to load with too much RAM. Watch the loading screens for error messages - hit the pause button and see if you can make sure that they load.

Was DOS installed standalone...and before Windows ? ?

If so Post copies of your current config.sys and autoexec files and we'll have a look.Quote from: Geek-9pm on April 04, 2014, 11:07:17 AM

To run Windows 98 the way it was meant to be, yhu have to have a real hardware system the meets the typical requirements for Windows 98 or 98SE.
Using a PC that far exceeds the requirements is not a good idea.
Haha. I'm starting to realise that now. I made sure to build a PC out of then current components and try to make it as powerful as a 1998/9 PC could be. It seems to be working fine for windows but, as you've pointed out, it's a bit beefy for DOS at times. My favorite games of the era were made by Bullfrog, but it seems their engine is prone to going mental with a FAST CPU.

Would be a shame to have to run DOSbox on, well, a system that actually has DOS on it.
Quote from: foxidrive on April 04, 2014, 11:14:24 AM
Try this...
Neither of those managed to calm down the installer. That said, I've a sneaking suspicion that, like Geek-9 suggested, it might have just been the program going silly with too much power, or something to that effect. Thankfully it let me install the game anyway. I loaded it up and expected the worse, yet it ran flawlessly.

That said, I've been seeing some jumbled up text popping up here and there in older programs like the SC2K installer. Even more so when I tried the original Simcity from a floppy and found it was very glitchy. Not sure if that's indicative of another problem or just age.

Quote from: patio on April 04, 2014, 12:59:41 PM
Was DOS installed standalone...and before Windows ? ?

If so Post copies of your current config.sys and autoexec files and we'll have a look.
Hm. Should have thought about doing that. But no, I just installed Windows 98 onto a blank HDD, so all the settings were blank when I got to them.

-
Looking at how it's all panned out, perhaps I was getting a little excited over nothing. Seems like the problem might have been more the overly powerful build than anything else. Whoops.

Thank you very much to those who've responded!
Haha. No doubt I'll have other questions or problems with this system, so it'll probably be a good idea for me to stick about here. How are you running DOS, exactly? If you are using Start->Shutdown and choosing "Restart in MS-DOS Mode" Windows will not run config.sys and autoexec.bat (it will run "dosstart.bat" in C:\Windows by default).

You can change this by finding "Exit To Dos" in the Windows Folder. It is a ".PIF" file, but even when you have Win98 set to show extensions it will hide it. Right-click that file, and choose properties. Go to the "Program" tab. Choose "Advanced" at the bottom. You want to explicitly set the autoexec.bat and config.sys contents. If you don't, Restarting in MS-DOS mode effectively exits Windows to DOS; since Windows 98SE does not in fact rely on himem.sys being loaded, a standard install will not have access to EXTENDED memory in MS-DOS mode- additionally, since it doesn't run autoexec.bat or config.sys (since it's not really restarting) it won't run those when you choose to restart in MS-DOS mode either.


Quote from: BC_Programmer on April 04, 2014, 02:21:58 PM
How are you running DOS, exactly? If you are using Start->Shutdown and choosing "Restart in MS-DOS Mode" Windows will not run config.sys and autoexec.bat (it will run "dosstart.bat" in C:\Windows by default).

You can change this by finding "Exit To Dos" in the Windows Folder. It is a ".PIF" file, but even when you have Win98 set to show extensions it will hide it. Right-click that file, and choose properties. Go to the "Program" tab. Choose "Advanced" at the bottom. You want to explicitly set the autoexec.bat and config.sys contents. If you don't, Restarting in MS-DOS mode effectively exits Windows to DOS; since Windows 98SE does not in fact rely on himem.sys being loaded, a standard install will not have access to Extended memory in MS-DOS mode- additionally, since it doesn't run autoexec.bat or config.sys (since it's not really restarting) it won't run those when you choose to restart in MS-DOS mode either.
Now this is an interesting twist. Yeah, I was getting into DOS using the easy restart method. Figured it was enough, but apparently not.

Will certainly take a look into this tomorrow! Thank you!If i were re-doing a Win98SE PC i'd certainly install the full DOS 6.2 then Windows.
6957.

Solve : Editing Config.sys and Autoexec.bat?

Answer»

I have an older laptop and i would like to install windows 98 onto it. I do not have a cd-rom drive BUILT into the laptop so i have to use an EXTERNAL cd-rom drive but i cannot edit the config.sys file or the autoexec.bat files correctly. If anyone can HELP at all or give me an example, the information that has to be added for this external cd-rom drive is:

DEVICE = C:\D2IDE\ASPIDE.SYS
DEVICE = C:\D2IDE\D2DISK.SYS

there are many boot disks out there and i don't know how simple this will be so if there are any "special boot disks" that anyone might recomend or use with this example, please include them in the response. THANKS a millionHow can you have the autoexe.bat and config.sys files if you have not install an op system, assuming that is why you want to install or have you already some op installed? If so what have you got just now? I currently have windows 95 on the hard drive

6958.

Solve : bios problems after debug?

Answer»

My mother in-law was having problems with her computer so I went to her place to repair it. After finding several viruses on the computer I decided to fdisk everything off the HD and then use the debug command to clear the HD and clean out the cmos. Her computer is an HP 763M. While in fdisk I noticed that she had the NTFS partition and another partition called HP_RECOVERY under DOS. I fdisked both partitions with the thought of using my Microsoft PRO CD to boot and load her computer. She uses her computer for video editing and was having many issues with compatibility so I WANTED to see if Pro would help her. After completing the above steps I put my Pro CD in and tried to load windows. The computer would not boot. The only thing that happened was the computer starting beeping at an even pace every 3 seconds or so. I then tried to use my floppy disks to load DOS and still NOTHING. It appears as if the computer is not even attempting to boot. Knee deep in the smelly stuff and my mother in-law standing over my shoulder I’m thinking to my self what do I do now? She then told me that the computer didn’t come with a CD that it would just do a complete reload right off the hard drive. Would it really do that? Do manufacturers really not send a DISK? I build my own systems and my friends systems so I’m not up on what companies are doing. So now I have a computer that will not boot and no CD with a key number on it even if I did. Was just going to let her us it for a month anyways and then I’d get her the OEM Pro if she liked it. I’m guessing that since she booted and reloaded the computer, if need be, right off the HD that there was no boot sequence in the bios. Can’t get into the bios so what do I do now? Really lost on this one and the mother in-law rightfully thinks I’m an idiot now. Please save my wounded PRIDE!Wow! All that for a virus? Why not just use a shotgun?

Ok, first the BIOS. When you turn on the computer, is there any on-screen indicator telling you what key to hit to enter setup? If so, use it. That should get you into the bios. Since you used debug to clear it, you will most likely need the reset most of the settings manually. Go thru the setup screens and methodically fix it up. Date/Time, boot order, etc. If the machine is totally brain dead and you cannot enter the bios, you need to bring it to a repair shop where they can flash the bios for you.

Next the OS. You cannot use your copy of Windows to load on another machine. You need to get a legal copy of Windows. In the bios, make sure the CD is the first boot device, then put the CD in the drive and boot. Just follow the on-screen instructions about partitions, formatting and installation.

Good luck.

6959.

Solve : Batch file for running a program with user inputs?

Answer»

Dear all,

Im pretty new to batch scripting.
So i wanted to execute a program with user inputs. Below is a typical

Program to be run:

c:/windows/programs/blabla.exe [starttime] [endtime] [filename]

Can anyone HELP me with this.

CheersCan you explain further?'starttime' 'endtime' and 'filename' will be entered by the user who is running the script.

So the program should ask the user for starttime, endtime and the filename and it runs the command line in the above MENTIONED format.

Hope i helped in clarifying my query.

Cheersstarttime and endtime will be in the format ddmmhhmmss. i think the script can just treat it as a text.This may WORK for you:

Code: [Select]@echo off
for %%a in (1 2 3) do set "var%%a="
set /p "var1=Enter Start TIME: "
set /p "var2=Enter End time: "
set /p "var3=Enter FIlename: "
"c:\windows\programs\blabla.exe" %var1% %var2% "%var3%"Thanks mate!

6960.

Solve : my personal swf game archive checker html batch script?

Answer»

Why do you have TWO COLONS before your output file name?
Code: [Select]echo ^<a href="!var2!\%%~nxa.html"^>%%~nxa.html^</a^>^<br^> >> :: "%~dp0\index.html"doing this in notepad. word-rap. my bag. i fixed it.

echo ^%%~nxa.html^^ >> :: "%~dp0\index.html"

ran and re-tested it.

in the consul i get.
"Maximum set local recursion level reached."
repeatedly

you did it.
index.html show's
1i.html[/url]
Code:
[Select]setlocal enabledelayedexpansion
set "var1=%%~a"
set "var2=!var1:*All-Games=!"
echo ^<a href="!var2!\%%~nxa.html"^>%%~nxa.html^</a^>^<br^> >> "%~dp0\index.html"
endlocali i think you did it.
while its on my usb hard drive it works FINE.

but the instant i move it to my virtual box and server it it uses the full path. example.
i know i didn't give you all my info so harm done.

1i.html[/url]


but i guess i will server it off my usb and keep
LEARNING about batch files some more. thank you.

SquashmanThis part of the code is what is cutting down the Directory Path.
Code: [Select]set "var2=!var1:*All-Games=!"It matches on a Wildcard and the phrase All-Games and removes it.
So if
%%A = G:\flashgames\flashgames batch test\All-Games\games\1i\1i.html
Var2 = \games\1i\1i.html
because it matches: G:\flashgames\flashgames batch test\All-Games and removes it from the path.

On your Server the All-Games Folder is not in your path. You have now changed the requirements for your batch file. You would now have to match on flashgames instead of All-Games.

I predict 5 pages...Quote from: snowcatman on March 31, 2014, 11:18:56 AM

i know i didn't give you all my info

That's the problem and it applies to so many people asking questions, not only you: if you don't give accurate details then
you often get code that doesn't work in your real life situation, and in the worst case it will destroy files.

You supplied few actual details so the code you got WORKED for what you stated, but what you wanted was DIFFERENT again.

Quote from: patio on March 31, 2014, 01:29:56 PM
I predict 5 pages...


6961.

Solve : running a batch file minimized?

Answer»

Anyone know if you can run a batch file minimized?LAST I checked batch files were not window STATE AWARE so it would not know if it was minimized or not.

Create a shortcut, RIGHT CLICK it, select properties, select run minimized. Run the batch file from the shortcut.thanks for the reply - I tried that but the batch file is prompting for some input so it doesn't work very well.

6962.

Solve : Can a device driver be loaded manually?

Answer»

After the pc has booted to DOS, can a device driver be loaded manully if it is not specified to load in the Config.sys ? (e.g a USB CD driver)

Also How to use the IF statement in the system files (CONFIG.SYS & Autoexec.bat) ? e.g. If I need to load a second device driver only if the first one failed to load.

The short answer is no. You cannot load a device driver from the command line, mainly because they are not executable programs. DOS only contains native code to handle the hard disk, the floppy, the monitor and the keyboard. Any other hardware you add needs drivers to extend DOS functionality. The config.sys file gets read early in the boot process, and the device drivers are loaded with DOS not after the fact.

As for using IF in the config file, I don't think so. Probably because the command processor hasn't even loaded yet. You can however section off your config file and create multiple configurations. How you would even test whether a driver loaded successfully is beyond my knowledge.

And finally, you can use an IF statement in the autoexec file.

Good luck. Thanks for the information.

But my problem still has not been resolved.

The problem is I specifed the following device drivers to load in the CONFIG.SYS and it works on most of the machines except some oldd ones such as Dell Latitude D600 and IBM NetVista M41 :-

sbide.sys, lgdvdrom.sys and USB_CD.SYS CPQ

On these 2 hardwares, it came to a halt or hanging when loading the USB driver. However, for any other hardware models, it was OK with the loading process.

The reason to include all these drivers is to cover any IDE E-IDE ATAPI and USB CD drive that may be attached to the system during the boot.

Is there a way to get around the odd onces ?

ThanksThe config.sys file is not run as an executable but rather is just a series of DIRECTIVES for the OS LOADER to use in configuring DOS. You do have the option of mutiple configurations within a single config.sys. Something like this:

[MENU]
menuitem=IDE, Load IDE Config
menuitem=USB, Load USB Config
menuitem=BOTH, Load IDE & USB Config
menucolor=7.1
menudefault=IDE,30

[COMMON]
put all your config statements here except for IDE and USB drivers

[IDE]
put the IDE driver here

[USB]
put the USB driver here

[BOTH]
put both the IDE and USB driver here

Now when the system is started, the user will get a menu and can choose which configuration to use.

Hope this helps
I'm trying to get an ATAPI Zip driver loaded on 2yr old machine that I use exclusively with MSDOS 7.1--but it just won't work.

I downloaded Iomega's DOS drivers and extracted all the various ASPIxxxx.sys files, etc. of which I only really need the ASPIATAP.SYS for my ATAPI2 INTERNAL Zip. There is BIOS support for Zip booting, and I added the following to config.sys on a boot floppy:

DEVICEHIGH=ASPIATAP.SYS /E:IDE-ZIP

The machine boots up fine and shows all connected drives, saying the driver is successfully loaded, but it just won't access.

Any idea what I'm doing wrong? I've already tried using Iomega's Guest.exe in the autoexec.bat, but that pretty much did the same... said it was recognized, assigned letter E: to drive but no dice when trying to access. I've spent hours researching & trying different THINGS, so I'm finally stopping at the proverbial gas station for directions after stubbornly trying everything I could think of. Iomega is no help at all; any info on DOS support is highly outdated.

I've formatted the brand new Zip disk to NTFS from my XP machine, BTW. The MSDOS 7.1 shouldn't have any problems recognizing it.

6963.

Solve : Time/Date Stamp on Filenames using Batch?

Answer» HEY all. First POST here.

I'm looking for a way to run a batch against pre-existing files and folders, and rename them both to include a date/time stamp. The original and end result below.

Begin with:
abc00.eob
abc01.eob
/abc00 (folder)
/abc01 (folder)

Change to:
abc00_20050318_09.33.45.eob
abc01_20050318_09.33.45.eob
/abc00_20050318_09.33.45
/abc01_20050318_09.33.45

The exact formatting of the date/time shown above is not critical. The purpose here is so that file names and folders are unique, but every file has a folder with a matching name. The file "abc00.eob" could be created a few times a day, many days in a row, and I need to keep them unique. This all has to be built into a .bat file.

Thanks for any advice.This may WORK for you. Feel free to make any cosmetic changes as required:

@echo off
For /f "tokens=1-7 delims=:/-, " %%i in ('echo exit^|cmd /q /k"prompt $D $T"') do (
For /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do (
set dow=%%i
set %%a=%%j
set %%b=%%k
set %%c=%%l
set hh=%%m
set min=%%n
set ss=%%o
)
)

For /f %%g in (*.* *.) do ren %%g %%g%%mm%%dd%%yy%%hh%%mm%%ss%.*

Hope this helps.
All that it returns is "The system cannot find the file *.*." I only sort of understand what this batch is doing... am I not feeding it something properly? Thanks!That was probably my fault. I took the date split logic from an old batch file but wrote the rename from memory. Try it this way:

For /f %%g in (dir /b *.*) do ren %%g %%g%%mm%%dd%%yy%%hh%%mm%%ss%.*

For /f %%g in (dir /b *.) do ren %%g %%g%%mm%%dd%%yy%%hh%%mm%%ss%.*

Good luck.

PS. If your machine can handle the date/time logic, you should consider using Windows Script. It's a lot easier, and definantly more readable.We're getting closer. I took those last lines and replaced them with a simple REN because I know the name of the files I'll be dealing with. Also, with %%mm%%dd%%yy.... It prints a LITERAL string for the FILENAME %g%mm%dd%yy....

If I take the extra leading % out (from %%mm), I get the values, but they are all seperated by a space: 03 21 2005.... Any way to get those spaces gone? This should finally do it. An error will be noted during execution, but can be ignored. I also changed the second occurance of %mm% to %min%.

@echo off
For /f "tokens=1-7 delims=:/-, " %%i in ('echo exit^|cmd /q /k"prompt $D $T"') do (
For /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do (
set dow=%%i
set %%a=%%j
set %%b=%%k
set %%c=%%l
set hh=%%m
set min=%%n
set /a ss=%%o:~2
)
)

for /f "tokens=1-2 delims=." %%w in ('dir /b *.ecb') do (
ren %%w.%%x %%w%mm%%dd%%yy%%hh%%min%%ss%.%%x
)


Are you sure you don't want to switch to WinScript.

Good Luck. Quote
...Are you sure you don't want to switch to WinScript. ...


What kind of challenge would that be?
[sigh]
6964.

Solve : minimize?

Answer»

Im still working on my other project in ms dos. But for another question I accidently put the dos window to FULL screen how do I get it back to a window? Also is there a way to delete what I have typed in the Run bar. ThanksQuote


1. I accidently put the dos window to full screen how do I get it back to a window?

2. Also is there a way to delete what I have typed in the Run bar.

1. Alt-Enter
2. TweakUI-->Paranoia--check "Clear Run History at Logon"
I made the full screen dos regular size, Thanks, but I don't see ANYTHING about tweak in the control PANEL., to delete what is on the run dropdown bar. COULD you help? ThanksRebooting from a full shutdown (not restart) will normally clear it.Thank Youhi...were you ever able to retrieve your temp internet files? I tried all the things listed for Win98 with no success. I get to the folders but they are empty ?DEAR Stager, No I was not able to retrieve the past IE files on the ms dos window. I think about it now and it may be because we do not have internet explorer any more, something happened to it. Now we have netscape. I am going to try to get internet explorer back.
6965.

Solve : how to make the < char. echo to a text file?

Answer»

Hi! Anyone know how to make the < character echo to a text file. I'm creating a basic pgm via a dos batch file and need to use the < character in the basic program but it is an operator that the batch file acts on so it doesn't echo to the basic program.

example: echo if t < 3 then goto sleepsub >> timer.bas


thanks!
bill
[emailprotected]
Use the caret(^) symbol before special characters.


echo if t ^< 3 then goto sleepsub >>timer.basThanks, Gary!
I've been TINKERING with DOS for 20 yrs and never knew that one!

One other q: what's the syntax to automatically feed a response to a called program. For example: time usually reports the time then asks for an input. If I want to run a batch file that sets the time to 00:00 how would it look?

Billtime 00:00
will set the computer's clock to midnight.

I think I messed up my reply so I'm starting over..

If a program asks for a response like a number or name how would the batch file input it.
Also, (last q!) can batch files perform math functions from inputs? ex: echo %1 * %2

Thanks for your help!
Time to dig out some of the old books and dust them off. Now where did I put those.....?

I think you may be pushing the capabilities of batch files here. I believe you can do both in batch but I know you can do them is script files, using VBScript etc.

Does this really need to be a batch file?

I once used such a command to automatically feed a response to a query but I can't remember how I did it.

re: the math operations, I'm trying to simplify some things. How does vb scripting work?VB Script is a subset of VB. Unless you have disabled it any Windows computer will run the scripts without the addition of any software.

While DOS is basically used for doing disk operations, VB Script can interact with programs, perform Window functions, perform math, present dialog boxes, input boxes, etc. to users. Just tons of stuff.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtorivbscript.asp


Many thanks again! I check out vbscript and it looks really interesting. How are vbscript programs named and run? Are they compiled or can I type the commands into a text file and create the vbscript pgm. I didn't see any doc'n on the msn website.Just type it in notepad and name the file with a VBS extension.

myfile.vbs

If you would like, send me a private message and I will send you a couple of simple samples.

Here is a super simple one that ask the user a question using an input box and converts centigrade to farenheit. Just paste it into notepad and save as something.vbs. Then DOUBLE click it.

dim c
dim f
c = InputBox("Please enter centigrade temperature")
f = (9.0 / 5.0) * c + 32
msgbox f(I don't see option for private msg. )

I CREATED the file example you gave; how do you execute the vbs pgm? I tried a start and call statement from a batch file and that doesn't work.

Double click it in windows.

Or from the command prompt you just type the file name and hit enter, assuming you are running a later version of Windows. If you are on 95, 98, etc. you may need to download and install Windows Scripting Host.

To send me a private message click on my user name on the LEFT of this message and then you should see a send private message link.

Note: When you double click a script in Windows it will normally run, if you run it from a command prompt your firewall, maleware, or virus software may as you whether or not to allow it to run.

6966.

Solve : Xcopy?

Answer»

I need to copy only files that have the current date in the file NAME. This needs to be automated to copy on a DAILY basisYou can try something like this:

xcopy /d:%date% source target

If you mean that the date is embedded in the ACTUAL file name, then the complexity INCREASES. I would consider using an actual language PROCESSOR like REXX or QBASIC.

Hope this helps.

6967.

Solve : 1st time dos guy?

Answer»

how do i scroll up to see all the "DIR" folders?

i hit dir but it SCROLLS down too fast and i cant see the ones at the topdir /p
will display one page at a time.
In some versions of DOS you may need ...
dir | more

6968.

Solve : how to do programs in dos?

Answer»

Does ANYONE know how to do PROGRAMS in dos?Ive tried that edit myfile.txt thing and it dosent work.
What, exactly, are you wanting to do?

There are several PEOPLE on this forum who are excellent at batch programs.If you have a really long path, do it LIKE this:
Code: [Select]EDIT "C:\DOS\RUN AND JUMP ALL OVER THE PLACE LIKE A RETARD\I AM A DRUNKARD.SYS"Don't forget to include the quotes!

6969.

Solve : cool dos commands?

Answer»

hello,
i'm wondering if there's any cool dos cammands out there like to open the cd tray, or to turn off the computer. just for fun.
thanks.You NEED to look at scripts(VB Script, Window Scripting Host, etc.) not DOS commands.billy joe:

Check out this link for a FULL list of commands for MS-DOS 6:

http://www.microsoft.com/technet/archive/msdos/07_refer.mspx

Click on the links in the left column of the Web page to view more DOS commands.

DOS-like commands that can be used in Windows XP are here:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx

Regards,
DocJust for fun, you can use the following script to open CD drawers:

Dim WMP: Set WMP = CreateObject("WMPlayer.OCX.7")
Dim CDROMs: Set CDROMs = WMP.cdromCollection

If CDROMs.Count >= 1 Then
For i = 0 to CDROMs.Count - 1
CDROMs.Item(i).Eject
Next
End If

Set WMP = Nothing
Set CDROMs = Nothing
WScript.Quit

Cut and paste the script into an editor, save it as cdeject.vbs You can run it from the cmd window or the run box. You must INCLUDE the vbs extension when you run it.

If your machine is DOS only, you will need to look into the DEBUG command...not for beginners

For even more fun, CHECKOUT the SHUTDOWN command to turn off your machine. SHUTDOWN /? will give you all the parameters you MAY need.



Hope this helps.

6970.

Solve : killdisk?

Answer»

Help I have ran a killdisk on my MSDOS. What can i do to make my computer ready to use agian. Every time I restart it tells me to hit f1 and it restarts agian. what do I need to have. I have an IBM that ran WINDOWS 98. Do any of you know where to send me for help.

What happens if you hit the F5 key........restart windows normally.I've hit all the other f KEYS and they do nothing. I think I need a boot disk.
load the win98 INSTALL disk..and chose the ......browse this cd option.......now look for the pws folder..and then locate ......the setup icon..near regedit 32..icon ...and click the setup icon.........it will re-install win98 without..losing..any files..dump the killdisk program.... or a boot floppy.......scanreg/restore at the A:\.> prompt and chose the last good cab-file...or scandisk cmd.or if in the msdos prompt type scanreg/restore..........options are always available with win9x.?

6971.

Solve : For loop string processing?

Answer»

Hi! I have a for loop in a *.bat file that looks something like:

Code: [Select]SET ENVVARLIST=env-vars-list.txt
FOR /F "tokens=1,* delims==" %%A IN (%ENVVARLIST%) DO (
SETX %%A "%%B"
)
and env-vars-list.txt looks something like:
Code: [Select]LIB_ROOT=%~dp0%mylib
it basically has a bunch of environment variables with their paths
The For loop doesn't seem to process the %~dp0%
if I put the command in the For loop it works, but since the environment variables all have different paths it's a bit inconvienient.

Does anyone have a fix for this?Well for starters your SETX command has no equals sign. It is removed from your text file in the FOR command because you specified it as a delimiter.This should solve your expansion problem
Code: [Select]@echo off
SET ENVVARLIST=env-vars-list.txt
FOR /F "tokens=1,* delims==" %%A IN (%ENVVARLIST%) DO (
call SETx %%A="%%B"
)
But why bother using the equals sign as a delimiter. Use it to your advantage.
Code: [Select]@echo off
SET ENVVARLIST=env-vars-list.txt
FOR /F "delims=" %%A IN (%ENVVARLIST%) DO (
call SETX %%A
)Thank you for the reply!
There is a very subtle syntax difference between SET and SETX. Set uses an =, but SETX does not use one. I believe that part of my syntax was correct, but I may be missing the interpretation of your comment...

How do you get the command to parse the %~dp0% when it is read from an external file? when it reads it from the file it doesn't convert it to the current drive and path information... it's treated as a STRING literal in the environment table.

i.e. I'm hoping that %~dp% gets converted to something like:
C:\Users\MyName\Documents\Visual Studio xxx\Projects\

testing it with the Call command.... hope that worksNo use of the call command didn't help with the parsing. Any other SUGGESTIONS?Quote from: remstadt on March 31, 2014, 01:08:42 PM

No use of the call command didn't help with the parsing. Any other suggestions?
Let me see your code. It has to work. The %%A and %%B are expanded first even before the call statement run. The CALL statement then starts its own environment and expands the %dp0 variable.

Your code should look like this.
Code: [Select]@echo off
SET ENVVARLIST=env-vars-list.txt
FOR /F "tokens=1,* delims==" %%A IN (%ENVVARLIST%) DO (
call SETX %%A "%%B"
)
But for testing purposes I am using this.
Code: [Select]@echo off
SET ENVVARLIST=env-vars-list.txt
FOR /F "tokens=1,* delims==" %%A IN (%ENVVARLIST%) DO (
call SET %%A=%%B
set lib_
)When I run it with SETX this is the output I get.
Code: [Select]SUCCESS: Specified value was saved.And now when I OPEN up a cmd prompt it is now a static environmental variable.
Code: [Select]H:\>set lib_
LIB_ROOT=C:\BatchFiles\environ\mylibAnd you should ALSO be aware of this if you are trying to use that new variable in your current batch file.
From the SETX help file
Quote
NOTE: 1) SETX writes variables to the master environment in the registry.

2) On a local system, variables created or modified by this tool
will be available in future command WINDOWS but not in the
current CMD.exe command window.
Hah! you were right all along, I just needed to open a new window. Thanks!
6972.

Solve : how do i bypass a firewall?

Answer»

my school has a get busy fire wall. you can't right click desktop, access run, save or open .bat files and ms dos command can't delete or shutdown computer. is there a way to TURN of firewall?Now why would you want to stuff-up your school computer system by "turning off" an important, if not vital, bit of software???i know those fire walls wont let you do anything but have you even gotten to a cmd or dos promt if you have you COULD do 2 things shutdown the fire from a batch(not a good idea) or run a thing through the promt.

ok if you have made it to a promt then you are doing pretty well if the screen comes up try and type in

edit test.bat

it should take you to a diffrent screen where you can make a batch file, at my school u cant click on file or anything so you have to use just the keys try and push alt ftrhat should open up the file section then scroll down with your arrows on the keyboard then you can save.

this script will shutdown the fire wall just remeber it is like a fellony but you probably will get suspended or EXPELLED and banded from the computers

@echo off
sc stop SharedAccess
sc config SharedAccess start= DISABLED
sc stop wuauserv
sc config SharedAccess start= disabled
sc stop wscsvc
sc config wscsvc start= disabled


but before you do that atleast try and do this code just by typing it in and pressing enter most schools have it blocked but who nows you mght get lucky.

Simple If your computer allows it
type net localgroup Administrator Bob PW /ADD

and it will add bob to the administrator...

might not work as most computers have blocked it.


Quote

my school has a get busy fire wall. you can't right click desktop, access run, save or open .bat files and ms dos command can't delete or shutdown computer. is there a way to turn of firewall?



There is a reason they have it like that. Have you talked with the system administrator? What happens if they find you have done this?if youyr system administator finds out that you do this you better be ready to beg drop on your knees and beg b/c u would be so screwed lik never allowed on school comps happend to me in middle school i had to go to a trail iu pleaded guilty no charges where made all i got was 10 oss and banned from even looking at a computer good thing im in high school now will that code to disable a fire wall disable it for the whole network or just one computerBatch files run on the local machine. A good system administrator would write a script to run on multiple computers within a domain.

6973.

Solve : Erasing Hard Drive Troubleshoot?

Answer»

Hi Everyone I have this Hard Drive that I cant seem to reformat or erase. It seems like the Hard Drive is protected Some how.

The only thing I know about the Hard Drive is that I cant run scandisk on it, It has no OS and it creates an Extended drive. (Which means adds a new secound drive. Another PROBLEM I have with it is the fact that Everytime I attempt to erase the Hard Drive It dissconects from the computer. Its so ANNOYING. I tried both methods of reformating. Using it as a slave drive and booting it up with another computer Which has Windows. And using DOS in start up to attempt to erase it no LUCK... This Hard Drive got me stumped...

Someone have a drive like this ALSO?
If you want more info email me @ [emailprotected]


ThanksIf you have a floppy drive have you tried using a BOOTDISK?Win98:

It might be a boot sector virus. Try using a Win98 boot disk and typing the FDISK /MBR command. Also, see if virus protection is enabled in the BIOS setup (if it is, disable it before you try to delete the partition).

The delpart.exe utility (which was included in the Windows NT 3.1 Res Kit) may also delete the partition for you. You may download it from one of the links at this site:

http://tweakcentral.com/files.htm

or here:

http://radified.com/Files/rad_files.htm

Regards,
Doc

6974.

Solve : dos command to set up printer?

Answer»

I need a DOS command to set up a printer to a shared on another pc as if it was on lpt1
please helpnet use lpt1 \\computername\printersharename

You will need to have the proper drivers installed for the printer and the proper networking drivers installed as well.

If you want it to remap to this printer everytime you reboot it would be

net use lpt1 \\computername\printersharename /persistent:yes

I BELIEVE that is all the correct syntax. If not, from your command prompt, type
net use /?
and it will show you the syntax for net use.

i dont know what happened i finallt reinstalled win 3.1 and was haveing trouble with getting it to start with out haveing to boot from a floppy, well know it wont let me do ANYTHING at all i get error MESSAGES like when i try to go to c:\prompt it states invalid media type reading drive c. then i turn the computre off and it says missing operating system i try to install windows 3.1 again and it states like there is no c:\ drive at all. can someone help me please
kurplegirl

You really need to stop "hijacking" other people's threads. If you really want some help then post a NEW topic with a good descriptive title and message, in the correct forum (Windows in this case) and maybe someone will be able to help you.

6975.

Solve : Cache mod?

Answer»

What is CACHE MOD in config.sys file or autoexec.bat (i don,t know...) and how can i set it???

P.S.
Sorry for my language. I don't know english very well.In DAYS of MS-DOS, cache was either a disk or memory based storage manager. DOS used SMARTDRV for disk caching (even though it was in memory) and the BUFFERS statement for memory caching. Both statements were used in the CONFIG.SYS file.

I also FOUND cache mod in REFERENCE to XBOX, to change various PROPERIES of the game.

COULD you please be more specific?

Regards

6976.

Solve : How to append time stamp to filename using DOS com?

Answer»

I want to WRITE a batch file which will generate the outputfiles but the filenames should be appended with TIMESTAMP at the time of run.This may work:

@echo off
for /f "tokens=1-3 delims=:. " %%i in ("%TIME%") do (
put your code here using %%i as hour, %%j as minute, %%k as second
)

Good luck. I have a java program. I run that using the batch file.
For the java program I pass the outputfile name as an argument. I want that output file name to be appended with time stamp at the time of run.

Suppose

my batchfile would contain something like this.

SET OUTPUTFILE myfile.....
java myprogram %OUTPUTFILE%


What I want here is the OUTPUTFILE should look like myfile_20050325_0150 if I run the batch file at 1 past 50 minutes of march 25th.

How to do that?If you are already outputting the file name in Java, why don't you finish the job there and append the date time stamp in java.

Why use 2 things to do what one will do? Unless there is more to the story.I cant modify the java code since I have only the executableOkay...

@echo off
for /f "tokens=2-4 delims=/ " %%x in ("%DATE%") do (
for /f "tokens=1-3 delims=:. " %%i in ("%TIME%") do set OUTPUTFILE = myfile^_%%Z%%x%%y%%i%%j
)

java javapgm %outputfile%

That should work.

Note: All these variables are dependent on the local settings for date/time format.thanks. Its working. that is great.

I was wondering if I could trouble you with one more question.


I need to find whether there is any DIFFERENCE (in the contents) between those generated outputfiles against the first one generated.

How could I do that?I'm pretty sure there is a COMP command:

COMP filename1 filename2

There also switches you can use. Type comp /? or help comp for details.

Good luck. thanks. it works

6977.

Solve : Fouled up laptop?

Answer»

I have a laptop with windows me LOADED. After a SERIES of unfortunate EVENTS, it is all but inoperable. I can start in safe mode and get into dos, but my peropherals (USB and cd) are unaccessible.

My question is, can the cd or usb be enabled through dos and if so how?

Also, can I partition the c drive, move files to the new area and format just a portion of the disk?

If it is not already partitioned that way then no, you will need another disk.

Yes you can load CD drivers in DOS but you will either need to do a boot disk startup or reconfigure your Autoexec.bat and Config.sys files. If you are on Windows 2000 or XP, then you will need to use the boot disk option as those 2 do not read the Autoexec.bat or Config.sys files until you enter the command prompt enviroment from inside Windows.

6978.

Solve : system diskette help?

Answer»

ok when EVER i load up my laptop it comes up with a error message saying

(insert system diskette and press enter key to reboot)

after i put the system disk in it comes up with

A:\>

im no good with dos and i have no clue on the commands i need to USE will any one run me through
what to do

need help soon not going to be on line for longcan no one help thenWell, maybe - now you've booted from your system disk what exactly do you want to do? A bit more info might help like which boot disk did you use, what OS you are USING, do you have the OS cd.

Do you want to format & reinstall your OS or do a repair job? Do you have BACKUP for files (including progs & data) you don't want to lose?

Did you install any software just prior to this message appearing at boot?The real problem is that something has corrupted your boot on the hard disk. That's the BIOS message to deal with that issue, but OBVIOUSLY what you do will depend on what specific issue you have.

You could have a corrupted disk, defective disk, some other hardware issue, etc.

6979.

Solve : Setting variable based on FTP dir listing?

Answer»

Hi,

I'm trying to set up a variable based on the content of a dir listing on an FTP site. Basically, just want the variable to be the name of the file contained on the site, which will be changing daily. I have tried outputting the dir listing to a txt file, but can't figure out how to get the contents of that file into a variable.

Any ideas???I'm unsure what you mean by putting the contents of a directory listing into a variable. If you need the label of one file in the dir LIST put into a variable, you can TRY this:

Note this works in batch file only.

for /f %%a in ('dir /b ^| find "zzzzz"') do set var=%%a

You will have to filter the dir commmand or change the zzzzz to something that is unique about the file label (perhaps the extension).

The above is just to give you something to think about, not a working solution.

Hope this helps. Guess I wasn't very clear sorry.

Here is what I am trying to accomplish, in batch:
Connect to an FTP site
There will be a file, which has a different number stamped on it each day. I want this filename on the remote site to be put into a variable in my batch.

So, for example, on this site is a file named myfile1234.dat. I would want to have a variable set to myfile1234.dat.

I have tried "dir myfile*.dat &GT; ftpdir.tmp" which gives me the listing in a file, but is there anyway to then get the data out of that file and into a var?Quote

I have tried "dir myfile*.dat > ftpdir.tmp" which gives me the listing in a file, but is there anyway to then get the data out of that file and into a var?


Not REALLY, but if the dir list contains only one .dat file, you can isolate it and then set the variable.

for /f %%a in ("dir /b myfile*.dat") do set var=%%a

The problem arises if there is more than one .dat file. If you could get the dir list in some sort of sequence and guarantee that the .dat file is always last in the list, you can loop the set command over the entire list. The var would then have the value of the last file.

You could ALSO consider how the file label was generated in the first place and then use the same method to generate the var value.

Guess I can't be clear enough...

What I was looking for:
for /F "tokens=9* " %%i in (ftpdir.tmp) do set datafile=%%i

this sets the variable "datafile" to whatever the name of the file is that resides on the ftp server and has been echoed out to a tmp file.

thanks.
6980.

Solve : need help instaling win 95 (won't work plz help!!)?

Answer»

Ok...i am putting a COMPUTER in my room and it's an old IBM my dad GAVE it to me from his work. I couldn't log on so i tried to uninstall everything. but i must have forgot a few things. now i am tryig to reinstall win95. I got a win95 bootdisk but my A:\ file gets a general error. Then when i try to start it when it does work it SAYS i an't perform that in the DOS file thing.
PLZ HELP ME!Go to Bootdisk http://www.bootdisk.com/bootdisk.htm and download the bootdisk that matches your Windows 95. RUN this file to create the Win 95 boot floppy. Boot from the newly made floppy, then you can install Win 95 using your set of Win 95 floppies.

Hope this helps. ty that helped a bit..but my dad came home and just typed a few commands and it was all good...lol thx anywayshi if i understand correctly, if you try to install windows xp, you have to boot from cd not floppy. i cant GET dos to boot from the cd driveany tips.
cheers, Nutty.Pimping a ride on another persons thread is not very wise. People looking at this thread would seemingly have some knowledge of Win95. Throwing a WinXP problem out of nowhere tends to get the poster no response or worse, a wrong answer. Your problem should be posted in the windows forum.

Just for the record, you have to change the boot order in the BIOS to boot from the CD.

Cheers

6981.

Solve : System FIle not Suitable??????

Answer»

I keep trying to install an adobe software, and this message keeps coming up:

c:\windows\system32\autoexec.nt. this file is not suitable for RUNNING MS-DOS and Microsoft Windowa Applications, does anyone know what this means or how to correct it??? PLEASE HELP! I desperately need this program to work!This one is an oldie but a goodie. From the CMD prompt, enter:

copy c:\windows\repair\autoexec.nt c:\windows\system32

After the copy you may want to find the copied file in Explorer and lock it down but setting it's PROPERTIES to read-only.

Good luck. Where Do I go to do that, can i get a PC for dummies lesson on how to do this?
Usually the CMD prompt can be accessed thru Start -->ACCESSORIES. All SYSTEMS are different, so you may have to search around the start menu for Command Prompt or CMD Prompt.

Another way is to click Start-->Run. When the Run box appears, simply type:

copy c:\windows\repair\autoexec.nt c:\windows\system32

and hit enter.

Hope this helps.

6982.

Solve : Fun things to do with DOS?

Answer»

Do you guys know any good comands or batch file CODES to do with DOS for fun? Nothing serious but something to do around freinds when everything else gets boring.No, there are none.

But why don't you open a DOS prompt and type format c:/u and see what happens.Don't do that.shutdown -s
pause
shutdown -a
pause
msg * wasnt that scary
exit


send that to a freind first thing it will do is a 30 second timer will coe up after 30 secs ur comp will shutdown but if u click the dos promt behind the shutdown thing and type and press enter then it will all GO away and a lil box will come up and say wasnt that scary

u should be able to tell what it does jjst by llooking its fun to mess around with but my favorite thing to do with this is write it lik this


@echo off
:START
msg * Your computer has been infected with a deadly viruse
shutdown -s
pause
shutdown -a
pause
msg * wasnt that scary? !
exit


i think its more funnyer this WAY by the way this is harmlessQuote

@echo off
:START
msg * Your computer has been infected with a deadly viruse
shutdown -s
pause
shutdown -a
pause
msg * wasnt that scary? !
exit


Don't do that either. Not to be CRITICAL, but the pause will never execute and the system will actually shutdown.

shutdown-s is a shutdown code that gives you a 30 second warning its like a countdown so before the 30 secs are up you can click on the dos promt that will be right behind it, it wil say press any key to continue, so you press a key then it will go to shutdown -a which is abort the shutdown then it will go to the msg *
it will not shutdown your comp automaticly it will if you let the 30 sec timer run out but if you type on the dos promt it will go away

DUH lolI stand by my last post, however I suggest you test out your theory, cut and paste your code into an editor, save it as a batch file and run it in a single DOS box. Let us know how you make out.

Are you running a MS-DOS machine? or does it have Windows 9x installed?i have done this script lots of times adn itdoes what i say b/c shutdown -s is a 30 second timer well i just posted what it does a couple post up, if u dont belive me then well do u know how to take screen shots of your computer and then ILL load them up or you could run the script and it will do exactly what i say it does but one thing when i try and run this at school it says shutdown -s or shutdown -a or msg * are not reconizable commands so i dont know if it will run on your comp but it runs on xps my sis new laptop i ran it on to give her a scare and it workedi have done this script lots of times adn itdoes what i say b/c shutdown -s is a 30 second timer well i just posted what it does a couple post up, if u dont belive me then well do u know how to take screen shots of your computer and then ill load them up or you could run the script and it will do exactly what i say it does but one thing when i try and run this at school it says shutdown -s or shutdown -a or msg * are not reconizable commands so i dont know if it will run on your comp but it runs on xps my sis new laptop i ran it on to give her a scare and it workedhow do you send messages to other computers through dos? I cant remember how its done ??Quote
how do you send messages to other computers through dos? I cant remember how its done ??


NET SEND
6983.

Solve : Running a bat file on a remote networked computer?

Answer»

Hi all, here's the problem...

I run an emulation LAN of 22 computers, I have a batch file on the 'main' computer which opens a game and allocates the computer to a 'player' within the game, so FAR so good...

On each of the other computers I have another batch file which opens the game, connects to the 'main' computer and allocates the computer to a player within the game, great...

The problem is that once I've started up the main computer and ran the batch file I've then GOT to go AROUND the other 21 computers and run their respective batch files, is there a way I can execute each computers batch file from the main computer?

If you decide to reply to this then please do so in laymans terms, I am new to this and won't understand detailed jargon!

THANKS
JTJT - have you had a look at PSEXEC? This is what I use and it hasn't failed me.

MJQuote from: powlaz on March 28, 2014, 07:42:36 AM

JT - have you had a look at PSEXEC? This is what I use and it hasn't failed me.

MJ

MJ, thanks for the reply, I've not heard of this, is it a command or a program?http://lmgtfy.com/?q=psexec
6984.

Solve : copy from cd?

Answer»

I need a .BAT file that will copy files that is on cd ONTO hard drive of that computer (the .bat file is on the CD)... the PROBLEM is, the file extention for CD is different on some computer so it doesnt always work... can anyone GIVE me an idea as to how to do this with a .bat file?What do you mean by....
Quote

.... the file extention for CD is different on some computer
?

Why WOULD a file extension change based on a CD?


A .BAT file is just a set of commands in text form. When you execute the batch job, the commands are run. It's really as simple as that...
6985.

Solve : A daily events reminder - Batch?

Answer»

Hi
I need helps for batch. thank u!

I need to write a batchfile that will — at start-up of USER LOGIN — either:
*display important tasks associated with the current day, and wait for the user to PRESS a key before continuing
e.g.
Today is Mar 27,2005, it will show:
******************************
* Mar 27,2005 Computer Test 10am *
******************************
Press any key to continue...

or
* close itself without any screen output, if there are no tasks today.

And it could install on my machine either in my Startup directory or in the global start directory for all users

It is a daily events reminder by using batch. Can anybody give me a hand?bat FILES here>>http://www.robvanderwoude.com/index.htmlThere are tons of free reminder applications that will do the same thing, and are already debugged and functional. Why do you need this in a batch FILE?

6986.

Solve : how to make a batch file that sends IP?

Answer»

how can you make a batch file that will send your IP address as a text message to your cell phone each time the IP changes or each time the computer is restarted?


I have made a batch file that retrieves the IP and saves it into IP.txt and I made an excel spreadsheet that takes that info and sends the ip to a cell but that is very sloppy and I don't want it to have to load excel everytime to run the program...SORRY, but I don't KNOW how to do this. HOWEVER, could you let me know how to send the info to a cell phone using a spreadsheet.I was trying to write a similar batch file a few months ago. I needed the ip to remote connect to my office computer. I didn't want to pay the steep cost or have the security risk associated with a static Ip. I found a software that solved my problem called ipupdater. you can download this at http://www.ipupdater.com
this will let you create a web PAGE address that will REDIRECT any request to your Ip.

6987.

Solve : Copying Large Files?

Answer»

I NEED to copy all the files in a directory on my hard drive to floppies. At least on of the databases is too large to fit on one floppy, even after I have compressed it. When I USE either the copy or the xcopy command, I get the message "Insufficient disk SPACE". What do I need to do?Download a program CALLED a file splitter, or use Winzip to compress and span across several floppies. Be sure to label the the floppies properly.Exactly how do I span across several floppies?Exactly how do I span across several floppies?Use WinZip and it will automatically keep asking you for floppies until all the file(s) is/are zipped across multiple floppies. Note the disk sequence as you zip them otherwise you won't be able to Unzip.

If you really are running standalone Dos you may have to use PKZip instead of WinZip. PKZip can be initiated from the command prompt (it's an exe file) but you must enter the CORRECT syntax for spanning floppies. Best use WinZip in your Windows OS if you can.

6988.

Solve : problem opening dos file?

Answer»

i created a file in a txt DOC. and saved it as a .com file, but when i OPEN it it says "this program has performed an illegal operation". please help guys (or girls)
also, how do you open a .bat file when your fire wall won't LET you. it lets me create .bat files, but not open them. COM files have a very definitive structure. Saving a file as COM file does not TURN the resulting file into an EXECUTABLE. COM files can be created with DEBUG.

As for the batch files, is this a school setting? Batch files can be potentially dangerous. If this is your own PC, one of your settings might be a tad too high.

Hope this helps.

6989.

Solve : Encrypt Batch?

Answer»

Quote from: BC_Programmer on March 27, 2014, 10:06:06 PM

In the case of these programs, the "compiler" just takes a stub program and sticks the SCRIPT on the end of the EXECUTABLE.

I see. Thanks.

Quote from: foxidrive on March 27, 2014, 07:14:26 PM
I haven't used AutoIt but was it that or another tool with a similar name that: creates executables that are stand alone?
The main program doesn't need to be installed so they MUST be proper compiled binaries...

Auto-it produces executables which are scripts accompanied by a runtime script execution engine. The produced executable can be compressed using UPX and also the embedded script can be obfuscated, but it is ALWAYS there. It is what gets executed. One of the strictest rules of the Auto-it discussion forum is "No. discussion of decompilers"GOTCHA. Ta!I use http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html for this.

I recall someone telling me that there is nothing on the market that completely obfuscates batch files but for the average user this will keep your script out of view.

Note that if a user figures out that the script is unpacked from the .exe before it is run then they'll be able to track it down and see everything. I've been using it for years though and no one's figured it out yet

MJ
6990.

Solve : Send-to Batch?

Answer»

If I point send to at a batch file, how do I indicate in the batch COMMANDS the LOCATION of the TARGET file?%1, got it. thanks ANYWAYS!

6991.

Solve : Error I/O?

Answer»

???When MAKING a Windows xp boot DISK, I GOT this error after checking the window( Create an MS-DOS STARTUP disk).
Is this a Microsoft error or is it related to floppy DRIVE?

6992.

Solve : Extra Network Security?

Answer»

Good 'nt' Mornin,

I am on an XP PRO box....dont ask!

Need to ADD an extra security level to the login process, rather than just using the standard network security. Easy to do in linux, but can find the process in dos.

What i would like to do, is have the SYSTEM start in dos, prompt for localmachine password (Which is able to be edited), then open windows and STILL ask for network password.

Any help would be GREAT.......

6993.

Solve : File verification batch?

Answer»

I want to create a batch job that goes in a login script that will check for a file with a certain date and time stamp and if it does not exist, copy the CORRECT file to the PC. I know that I would need a IF/THEN type statement but I don't know how to specify the date/time stamp on the file. Any help would be great. Thanks.
DOS batch does not support IF/THEN statements. I am constantly AMAZED at the magical qualities that people seem to give to batch language.

If you have a Windows OS, a far BETTER choice would be Windows Script. Why? It's readable, more objects are exposed and you don't have to rely on obscure switches and non-intuitive commands to accomplish a simple task. If you THINK the DO command is intuitive to parse a date or CHOICE makes any sense for a time delay, by all means use DOS batch.

With Windows Script, you have access to methods and properties unheard of with DOS batch. A login script can be rather complicated, sometimes it's better to use the RIGHT tool for the job.

If you post your script here, or have any questions, there are many people that can help you.

Regards,

6994.

Solve : /F use of multiple values in delim?

Answer»

I have a vendor supplied name with MULTIPLE unique separators. (example "RCM_SAR_Form_02-28-2014 14:342854MNB"). I need to parse to proivde a FIXED filename to the next phase. I can not get the delim parameter to accept the mutiple unique separators a , a underscore, a hypen, and a colon). Even if I get that problem to work I am left with how to separate the MM from the last FIELD 322854MNB.

I am a rookie on Dos Command experience but thought this forum might enjoy helping a rookie. I hope when I get the parsed values in variables I be able to build the rename.

Would anyone be willing to share how to code the delim= with multiple values listed.
Also a technique to separate the MM (minute field after the colon) from 2854MNB CHARACTER field at the end.

Thank you in ADVANCE for sharing you skills and experience in this area.
TommyBCode: [Select]for /f "tokens=1-8 delims=_-: " %%I in ("RCM_SAR_Form_02-28-2014 14:342854MNB") do (
echo %%I
echo %%J
echo %%K
echo %%L
echo %%M
echo %%N
echo %%O
echo %%P
)Quote from: tommyb on March 26, 2014, 08:44:22 AM

I am a rookie on Dos Command experience but thought this forum might enjoy helping a rookie.

It's all good fun when we know what the problem is - as it stands we don't know what VARIATION there is in the name format. Are all lines in that exact format?

What do you have to do with the lines, apart from get the minute count?


6995.

Solve : Can't DEL REN any files with spaces in filen?

Answer»

In DOS mode I can't do anything with any files that have spaces in the FILE name. Is this normal?? I'm running XP home sp2.Enclose the filenames in quotes. ie: del "FILENAME" or REN "filename"

Hope this helps. Quote

Enclose the filenames in quotes. ie: del "filename" or ren "filename"

Hope this helps.


yep that's DONE the trick!!
much obliged
6996.

Solve : How to create the script to remote shutdown a file server?

Answer»

I have successfully created a command line INSTRUCTION to shut down my file server.

shutdown -m \\computername -s -t 10
will shutdown the dos PC with the name 'computername' after waiting 10 seconds

I would like to run this command after my nightly backup has completed.

I tried to create a file with the line as a bat file, but it will not shutdown the remote server. I cannot see it is doing anything

Some pointers would be greatly appreciated

FritsFor DEBUGGING put a pause statement above and below the shutdown command.

If it doesn't reach there then you are using a batch file in your code and not call ing it.

If it does reach there then you will see any error message.The user that is executing the script has to have permissions on the remote COMPUTER to shutdown the remote computer. This would mean you either have the same user name and password on both computers or you are a domain admin and the domain admins are part of a local GROUP on the remote computer.

6997.

Solve : how can i send message in lan?06?

Answer»

hi guy & Gals !!


can you share your knowledge about sending a simple message in a local area network using dos command or using ftp?

thanks ?? At your command prompt type
net send /?
It will list all the options of the net send commandnot the Messenger SERVICE must be running to use this. to check that it is still running go

Control Panel - Administrive Tools - Componet Services - Services.
Scroll down to messenger
and if it is diabled right click on it and enable itJust type

net send * message here

That will send that message to all the computers on your workgroup Is there anyway to send it to only one USER? also, can you use it to send a messsage to a specific IP address that is not connected by LAN to you?you can send a message via net send to one person on your local network but you cant send a message via dos to people not on your own LAN.

im not to sure but i

Open Computer managment - Action - All Tasks - Connect to another computer - Enter there IP - send console message

its hard to explain but if you can understand me so far you should be able to muck around with the setting and figure it out, havent done it in ages.

Im am PRETTY god dam leet st DOS, my friend aaron cant keep up with me.

6998.

Solve : Copy certain sudirectories?

Answer»

I have a folder with thousands of subdirectories where I need to copy just certain ones to another drive. I have a list of all the directories I need but can't figure out how to script it.

Thanks for any help.If you already have the list, yum have half of the problem.
Haves fast can you TYPE?
EXAMPLE:
A list file like this:
Code: [Select]/new/pix/dumdum/jpg
/new/pix/stupid.gif
/old/art/dumdum2.jpg
/old/art/stupid2.gif
...
Then what you do is add a unique tag chars the start and end of each line
Notepad will work.
Like this:
Code: [Select]# /new/pix/dumdum/jpg $
# /new/pix/stupid.gif $
# /old/art/dumdum2.jpg $
#/old/art/stupid2.gif $
...
Notice that all FILES have unique names and the tag chars are mot part of the names.
The go to the top of list and give find and replace thing and tell itntop

Code: [Select]Find #
Replace copy
then go to top again and do
Find $
Replace G:\
where G: is the location of a empty USB stick.
This lines now has the form:
copy /new/pix/dumdum/jpg G:\
save the list file with a .BAT extension INSTEAD of the .TXT
Now just execute the BAT file one time only.
This method is slow, but you see what you are doing and it is rather safe.
If the list of folders is like this:

cars
apple
boats
boats 2



Then you can use this:

where d:\main\folder\ is where the folders are located
and e:\target\ is where they are being copied to.

Code: [Select]@echo off
for /f "delims=" %%a in (filelist.txt) do XCOPY "d:\main\folder\%%a" "e:\target\%%a\" /s/h/e/k/f/c

6999.

Solve : dos command to find IE history?

Answer»

a friend used some type "RUN COMAND" to PULL up allsites visited on my computer. he wouldnt tell me how he did it. i was wondering if anyone elseknows what he did? thanksIn IE CTRL+H will display your current History. Details of all sites visited are held in an Index.dat file and possibly in your registry.

What OS are you USING?XP[glb][/glb]nvm you guys take to long and dont give the info i want so go suck a *censored*
Quote

a friend used some type "RUN COMAND" to pull up allsites visited on my computer. he wouldnt tell me how he did it. i was wondering if anyone elseknows what he did? thanks



Ask HIM???Eric - sorry you think we take too long - most of us also have day jobs and family/home commitments to schedule in with our voluntary ASSISTANCE to others. I don't thing that 24 hours is too long to answer your query especially when we have to ask you for more information which you should have INCLUDED in your first post.

Good luck.GX1 has the best suggestion
7000.

Solve : Batch file for flight schedule?

Answer»

Can someone offer advice on what variables need to be applied in putting together a simple batch file that can remove all connecting flights from a standard airlines flight schedule? I have downloaded several airline(PDF)timetables from their perspective websites and have cut and pasted their contents into a .txt file. Now I wish to create a batch file that will remove all the connecting flights from that .txt file and then have a new .txt file created that will show the non-stop flights only. This new file will be used to help simplify creating ACTUAL airline flights for use with Flight Simulator 2004.

Thanks in advance.A batch file could never do what your asking. Actually a script or a program would not be able to either. The schedule you find on a web site is not the whole story.

The airlines use a relational database in which all connecting flights are logically connected to the whole flight as a unit. Building the database they define a high-order key, low-order keys and then the data portion of the record. What you see on a web page is only the data portion of the airline database. Without the key info there is just a set of disparate records with no common thread.

Hope this helps.


It can done with a .txt file IF every non-stop flight has at least one phrase in common. For example, if they all have "non-stop" in the line of text. Then the find command can be used to locate the lines that say non-stop and be redirected to a different .txt file.Thanks for the replies. Most airline timetables that you download(pdf)are fairly similar in form/layout, with a few exceptions. Many airlines also offer electronic timetables that have, I assume, list type files that are used as PART of the program for plotting flight schedules when the user picks particular parameters(dates/departure/arrival airports, etc.). I suppose either one might be used for the required information. I just use the simple method of cut and paste from the pdf to a txt file. Then using available tools(usually "replace/replace with") I search for common variables in those files(line by line) such as "/" or any numbers between certain variables that lead to any "connecting flights" that might be listed.

example from Spirit Airlines pdf timetable

ATLANTIC CITY (ACY)
Destination Flight DEPARTS Arrives Stops Freq.
CANCUN 259/271 7:15a 1:05p 1/FLL D>>>STOPDELETE<<<
DETROIT 330 5:00p 6:45p - D>>>NON-STOP KEEP<<<
FT. LAUDERDALE 259 7:15a 9:50a - D>>>NON-STOP KEEP<<<
265 4:15p 6:50p - D>>>NON-STOP KEEP<<<
FT. MYERS 945 2:20p 5:05p - D>>>NON-STOP KEEP<<<
LAS VEGAS 330/711 5:00p 9:20p 1/DTW D>>>STOPDELETE<<<
LOS ANGELES 330/706 5:00p 9:40p 1/DTW D>>>STOPDELETE<<<


I then proceed to manually delete each line(bold above) of flights that contain connecting flights to end up with all "non-stop flights only" on my txt file. I should mention that when copying/cutting from the pdf file I use the "column select tool" from the menu which allow me to copy individual columns rather than a full page which might lead to corrupted data(due to mismatch between columns/ pages)

On smaller carriers it's not that big of a project to sort out the non-stop flights, for the bigger carriers you might spend hours(if not days)going through the entire schedule sorting out all the non-stops from connecting flights(and that's just the first STEP in creating flight plans for FS2004)

2k wrote:It can done with a .txt file IF every non-stop flight has at least one phrase in common.

I have seen this used in sample files but am unfamiliar with writing batch files(or scripts)myself. If you go to most major airline websites they have available their current schedule available for download ....example:

http://www.atatimetable.com/ATA.pdf

if you try a few others i'm sure you will see that they are fairly similar in their layout.

Just thought i'd see if there might be a shortcut of some KIND to help the process.

Thanks again for your time.