Computing.Net > Forums > Disk Operating System > Dos batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Dos batch

Reply to Message Icon

Name: pgoenka
Date: February 12, 2004 at 02:01:24 Pacific
OS: Window2000
CPU/Ram: 512MB
Comment:

Hi gurus,
I need a help in creating a dos batch job which does following things.
moves all file of date older then today in C: drive to drive D .And moves all files of today and of size greater then 1KB to D drive.
Please help



Sponsored Link
Ads by Google

Response Number 1
Name: Wengier
Date: February 12, 2004 at 08:42:27 Pacific
Reply:

Hi puneet, you are asking a Windows 2000 batch file programming question, but this is DOS forum. So you have asked your question in a *wrong* forum. Please note that Windows 2000 does not include "DOS". The "Command Prompt" in Win2K is just the WinNT/2K/XP system console, which is NOT DOS. Below is the *quotation* from the warning messages of this forum:

"DO NOT post questions related to NT Batch scripting on this forum. Use the Programming forum.

Use the Windows NT, 2000 or XP forum for questions regarding the Windows NT, 2000 or XP "DOS" command prompt."

For more information about the "Command Prompt" (Win32 Console) in WinNT/2K/XP, you may read this page:

http://mywebpages.comcast.net/stewartb/cmdprompt.html

Also, DOS batch and NT batch scripts are different to each other in both syntax and appearance, though WinNT/2K/XP does understand some or much (not all!) of the synatax of DOS batches (for some backward compatiblity actually) as well as the syntax of the NT batch scripts. For DOS batch commands, what you want to do can't be done without additional DOS batch tools (most of which won't work in NT systems, since NT handles environment variables and stuff in a different way), and/or do some programming/tricks by yourself; the significantly different NT batch scripting doesn't really belong to the DOS forum. So, it's a good idea to post your question in the Programming Forum or Windows 2000 Forum rather than the DOS Forum, as the rule (warning messages) of this forum says, and you will probably get a better chance to be answered there.

Below are some quotations from the following site:

http://www.batch.hpg.ig.com.br/

"(Here are) Batch scripts for Windows 9x (DOS), not NT. All scripts contained in this page were developed and tested under Windows 98 Second Edition (DOS). These scripts are likely to work on other DOS based systems, such as previous versions of DOS. However, since there are many differences between NT batch scripting and DOS batch scripting, some of these scripts might not work under NT systems (Windows NT,2K,XP). In fact, I do not recommend you to use any of this code on a NT system unless a note stating otherwise is made."

On the other hand, NT batch scripting won't work on DOS systems, since DOS can't understand NT batch scripting.

Please read the above site (http://www.batch.hpg.ig.com.br/) for more information and lots of useful examples of DOS batch files.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Dos batch

Dos Batch File Commands www.computing.net/answers/dos/dos-batch-file-commands/11921.html

File Size in DOS Batch file www.computing.net/answers/dos/file-size-in-dos-batch-file/3105.html

DOS Batch file to FTP files from UNIX www.computing.net/answers/dos/dos-batch-file-to-ftp-files-from-unix/2105.html