INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: OT - DOS Question for moving libraries  (Read 1823 times)

risingdamp

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 419
OT - DOS Question for moving libraries
« 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.
Logged
JLee

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: OT - DOS Question for moving libraries
« Reply #1 on: May 28, 2005, 04:55:11 am »

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
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Tab

  • Regular Member
  • World Citizen
  • ***
  • Posts: 194
  • Change this by choosing profile
Re: OT - DOS Question for moving libraries
« Reply #2 on: May 28, 2005, 05:25:35 am »

How are you managing to run DOS on an XP machine?

Tab
Logged

risingdamp

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 419
Re: OT - DOS Question for moving libraries
« Reply #3 on: May 28, 2005, 05:32:16 am »

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.
Logged
JLee

risingdamp

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 419
Re: OT - DOS Question for moving libraries
« Reply #4 on: May 28, 2005, 05:42:59 am »

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.
Logged
JLee

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: OT - DOS Question for moving libraries
« Reply #5 on: May 28, 2005, 06:14:14 am »

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.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20056
Re: OT - DOS Question for moving libraries
« Reply #6 on: May 28, 2005, 06:45:33 am »

How are you managing to run DOS on an XP machine?

Tab

It is called "Command Prompt" Under Start, All Programs, Accessories
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

risingdamp

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 419
Re: OT - DOS Question for moving libraries
« Reply #7 on: May 28, 2005, 08:04:48 am »

It is called "Command Prompt" Under Start, All Programs, Accessories
Or even easier: Windows key+R (or start>Run) then cmd enter.
Logged
JLee

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20056
Re: OT - DOS Question for moving libraries
« Reply #8 on: May 28, 2005, 08:22:50 am »

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.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Charlemagne 8

  • Citizen of the Universe
  • *****
  • Posts: 1999
Re: OT - DOS Question for moving libraries
« Reply #9 on: May 28, 2005, 04:35:34 pm »

You guys are OLD.
Logged
That's right.
I'm cool.

Tab

  • Regular Member
  • World Citizen
  • ***
  • Posts: 194
  • Change this by choosing profile
Re: OT - DOS Question for moving libraries
« Reply #10 on: May 28, 2005, 08:52:27 pm »

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
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20056
Re: OT - DOS Question for moving libraries
« Reply #11 on: May 28, 2005, 08:55:04 pm »

Quote
first computer had 1k video mem

The Atari 2600 Had 4K Of Memory
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

graham131

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 345
  • Yadb (get it?) dabba do.....
Re: OT - DOS Question for moving libraries
« Reply #12 on: May 29, 2005, 05:52:10 am »

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
Logged
Pages: [1]   Go Up