INTERACT FORUM
More => Old Versions => Media Center 11 (Development Ended) => Topic started by: risingdamp on May 28, 2005, 04:16:29 am
-
I'm building a batch file that will copy my MC library from one machine to another but I'd like to put a step in that asks for user confirmation before going ahead e.g. "Do you really want to copy the library?".
I've tried the dos help but can't work it out. Can anyone advise how I go about doing this? I'm on XP Pro.
-
Would this do the trick?
@ECHO OFF
ECHO.
ECHO Do you really want to copy the library?
ECHO.
ECHO Press Ctrl+C to abort.
ECHO.
PAUSE
-
How are you managing to run DOS on an XP machine?
Tab
-
Thanks Alex. I was hoping for a yes/no type of thing but that will do for now.
How are you managing to run DOS on an XP machine?
Tab
I just mean a .bat file.
-
This is working really nicely now. Just for info...
My master library lives on my HTPC and is shared with my development machine that I use for large scale tagging etc. It's important for performance on my HTPC that the library is not on a network drive. The only slight downside is that if I'm doing a lot of tagging from my dev machine the fact that the library is on my HTPC can have a performance hit since the 'saving database...' message appears a lot.
So now when I'm about to start a lot of tagging / importing I just hit a button on my desktop that:
1. Brings a copy of my master library from my HTPC to my local drive.
2. Changes the registry keys for MC to automatically switch it to the Dev library on the local drive.
3. Fires up MC
I have a similar button that will send the library back to the HTPC and set the dev machine to share it again when I'm done. It works a treat.
-
How are you managing to run DOS on an XP machine?
All Windows versions have a command line interface (command prompt) for DOS commands.
A batch file starts a command prompt and inputs the commands. If you like to try a batch file you could copy the code from my post and save it with notepad. Rename the text file as showme.bat and double-click it. It will just display text and end after your responce.
Risingdamp,
You are right. y/n would be better. The "any key" answer is a bit too easy to give accidentally. I'll check if I can find some old batch files with the y/n code.
-
How are you managing to run DOS on an XP machine?
Tab
It is called "Command Prompt" Under Start, All Programs, Accessories
-
It is called "Command Prompt" Under Start, All Programs, Accessories
Or even easier: Windows key+R (or start>Run) then cmd enter.
-
Or even easier: Windows key+R (or start>Run) then cmd enter.
Windows key+R (or start>Run) then 'command' enter.
also works
I don't think I would ever remember that however.
-
You guys are OLD.
-
You guys are OLD.
hehe, first computer had 1k video mem.
Thanks to every one re bat files. Have just been starting to do some work in DOS for visis. (Been a while since I worked directly in DOS.)
Tab
-
first computer had 1k video mem
The Atari 2600 Had 4K Of Memory
-
All Windows versions have a command line interface (command prompt) for DOS commands.
A batch file starts a command prompt and inputs the commands. If you like to try a batch file you could copy the code from my post and save it with notepad. Rename the text file as showme.bat and double-click it. It will just display text and end after your responce.
Risingdamp,
You are right. y/n would be better. The "any key" answer is a bit too easy to give accidentally. I'll check if I can find some old batch files with the y/n code.
You used to be able to use the choice command in Dos 6.22, not sure if it still works though
eg
@echo off
cls
echo.
echo A Microsoft Editor
echo B Microsoft Anti-Virus
echo C Microsoft Backup
echo.
choice /c:abc Choose an option
if errorlevel 3 goto MSBackup
if errorlevel 2 goto Msav
if errorlevel 1 goto Edit
:Edit
edit
goto End
:Msav
msav
goto End
:Msbackup
msbackup
goto End
:End
Cheers
gRaham