Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
I am trying to create a batch file that copies files from one drive to another. However, the files that I am copying to the new drive will take on a different name.
Is there a way to create a batch file that will specify the DOS syntax for copying the files from one drive to another but also give you a prompt to type in the new name for the file going to the destination drive:
ie) copy test.txt d:\backup\050200.txt
I would want an opportunity to change the destination file name 050200.txt to 050300.txt or any other name that I choose before it is copied over.
Any suggestions on how to create popups in DOS would also be helpful.
Hopefully this makes sense and someone can offer some help or other resources.
Thanks.

What will you give me if i can come up w/ a batch file that will do it?? :) i have done something like it before, the hard part is getting dos to prompt for input during the batch process... Do you want to use pure DOS utils or are 3rd party ok? It can be done w/ DOS utils, ie DATE,FC,FIND but it is kinda hard. All i want in doing this is braging rights.
Do you want the batch file to give a suggested name or just a blank line for input?

Hi,
Below is a simple bat using the user input.
See (copy con).
Have the input sent to a secondary bat.
It will rename the file.Sorry this paper doll comes up a little scrambled on the screen......but there is the requried code you need in it.
Hope this helps......Oh! This bat will not run as is. It uses ansi, a mouse, sound and other space consumers. But the input and copy con are the code you need.
Peace, goodwill and happy computing.
World Library
cls
@echo off
ansi /slow
cls:start
cls
type menu.doc
call getdate
echo [2;55H[1;34;47m%day% ÿ
echo [3;55H[1;34;47m%fulldate%echo [8;19H[1;33;44mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[m
echo [9;19H[1;33;44m³ ENTER YOUR PASSWORD ³[m
echo [10;19H[1;33;44mÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[m
echo [12;19H[1;33;44m THIS COMPUTER IS PASSWORD PROTECTED.[m
echo [13;19H[1;33;44m ÄÄÄÄÄÄÄÄPlease use your mouse.ÄÄÄÄÄÄÄÄÄ[m
mc /c5,3,18,5 20,3,32,5 32,3,42,5 43,3,50,5 50,3,69,5 19,7,59,9
if errorlevel 6 goto program
if errorlevel 5 goto stop1
if errorlevel 4 goto tips
if errorlevel 3 goto program
if errorlevel 2 goto view
if errorlevel 1 goto inst
if errorlevel 0 goto stop1
:stop1
goto stop:inst
cls
echo ooo
CLS
edit instr1.doc
rem start /MAX notepad instr1.doc
goto START
:view
cls
echo [4;20H[1;37;42mÿ ÿ
echo [5;20H[1;37;42m PASSWORD ÿ
echo [6;20H **************************************
echo [7;20H Created by World Library. ÿ
echo [8;20H Registration policy. FREEWARE ÿ
echo [9;20H ÿ
echo [10;20H
echo [11;20H ÿ
echo [12;20H Bug reports=:-( wlibrary@gdi.net ÿ
echo [13;20H ÿ
echo [14;20H Snail mail.....next page [m
echo [15;23H
ECHO [21;15H ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO [22;15H º Next! º
ECHO [23;15H ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
mc /c43,20,59,22
if errorlevel 1 goto next:next
echo [9;29H[1;37;45mÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo [10;29Hº World Library º
echo [11;29Hº Planet Earth º
echo [12;29Hº 11144 Batch File Lane º
echo [13;29Hº DOS Ville South Africa º
echo [14;29Hº º
echo [15;29Hº Thank You! º
echo [16;29HÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ[m
echo [17;32H
ECHO [18;15H ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO [19;15H º A Go Back! º
ECHO [20;15H ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
ECHO [21;15H ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO [22;15H º B Main Menu! º
ECHO [23;15H ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
mc /c43,17,58,19 43,20,58,22
if errorlevel 2 goto over
if errorlevel 1 goto back2:back2
cls
goto view:over
cls
type menu.doc
goto start
:program
type menu.doc
call getdate
echo [2;55H[1;34;47m%day% ÿ
echo [3;55H[1;34;47m%fulldate%
if not exist password.set goto nofile
echo [8;20H[1;33;44mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[m
echo [9;20H[1;33;44m³ Enter your P/W. Press F6 then ENTER ³[m
echo [10;20H[1;33;44mÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[m
copy con password.dat > nul
copy password.set+password.dat password.bat > nul
call password
if not "%password%"=="dobe" goto badpassword
echo [11;20H[1;33;44mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[m
echo [12;20H[1;33;44m³ Valid Password has been entered. ³[m
echo [13;20H[1;33;44mÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[m
goto done
:nofile
echo [14;20H[1;33;44mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[m
echo [15;20H[1;33;44m³Password.set missing (set password=^z) ³[m
echo [16;20H[1;33;44mÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[m
echo [17;20H[1;33;44mPress a key to return to menu[m
pause > nul
goto start
:badpassword
plany god.wav
echo [14;20H[1;33;44mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[m
echo [15;20H[1;33;44m³Wrong Password. Contact systems Admin. ³[m
echo [16;20H[1;33;44mÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[m
plany message.wav
echo [17;20H[1;33;44mPress a key to return to menu[m
pause > nul
goto start
:tips
echo [8;15H Always get the crack first.Then get the program.
echo [9;15H Be sure to read the FAGs for using Usnet. ÿ
echo [10;15H Wait two days before sending creeps a nasty gram.ÿ
echo [11;15H All of these files may be modified.
echo [12;15H[1;30;37m The http:/***@*** in news readers are hot. [m
echo [13;15H[1;30;37m Just double click and go to http: site [m
echo [14;15H[1;30;37m Even though you have a crack, if the program [m
echo [15;15H[1;30;37m is a keeper register it. Without your support [m
echo [16;15H[1;30;37m whats the point of creating new or improving [m
echo [17;15H[1;30;37m existing programs. ÿ [m
ECHO [18;15H[1;30;37m ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» [m
ECHO [19;15H[1;30;37m º Click to Clear º [m
ECHO [20;15H[1;30;37m ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ [mmc /c45,17,72,19
if errorlevel 1 goto nix
:nix
type menu.doc
goto start:done
set password=
del password.bat > nul
del password.dat > nul:stop
:end
clsansi/u
echo this is where you place the command to continue

Hey!If you wanted to do so,why don't you try
my way?Just do like this:
@echo off
:res
cls
if "%1"=="" goto help
if "%2"=="" goto help
Are you sure you want to copy %1 to %2?
choice /c:yn
if errorlevel 1 if not errorlevel 2 goto yes
if errorlevel 2 if not errorlevel 3 goto no
:yes
echo.
echo Be sure the source disk and target disk
echo is available.
echo.
pause
xcopy %1 %2
echo MISSION:COMPLETE (Muhahaha)
pause
goto end
:no
echo.
echo You have indicated that you don't want
echo to copy %1 to %2
echo Press any key to quit...
pause > nul
goto end
:help
echo.
echo Usage:
echo e.g.
echo jcopy c:\readme.txt a:\backup\abc.txt
:end
echo.
echo Bye![Save this thin' as jcopy.bat]
bye!
requirements:dos 6.0 or if you have that
choice program then lower than 6.0 also can.

i need help creating a password bat file so that my children can not get into or logon aol with my knowing about it. i also need to be able to change the password when needed.

I try to put a final line in my batchfile to close ms-dos window,
it is:
exit
the all commands in the batch file execute OK,but the last line is not,
the word EXIT appear after C:\
and ms-dos window stop there it not close at all,
I have tried something like
c/s (for "close screen) but it doesn't helpI appreciate your help.
many thanks.

HI
I AM TRYING TO CREATE A BATCH FILE TO LOOK AT THE TIME AND WHEN IT GETS TO A SPECIFIC TIME TO GO UNDER START AND SHUT DOWN THE COMPUTER. CAN YOU HELP ME CREATE ONE. THANKS.JUSTIN WEAVER

I also can not get the EXIT command to shut down the DOS window in Win98. I have found that it will work on NT, but it does not on Win98.

![]() |
How to install external c...
|
Say Thank You
|

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