Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6066175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:28:21+00:00 2026-05-23T09:28:21+00:00

I have a virtual hard disk .vhd file that I would like to backup

  • 0

I have a virtual hard disk .vhd file that I would like to backup on a daily basis by clicking on a shortcut on my Windows Vista laptop. I wrote a half-hazard batch script file (BACKUP.BAT) which accomplishes the job, where it open the cmd window and copies the file to the flash drive, but I would like to mimic (macro) the way the copying is displayed when you manually drag and drop the file into the flash drive in my computer. Another problem is that depending on what computer this is done, the USB flash drive could have drive E: assigned to it (WinXP) and on other computers (Vista/7) it could be drive F:. (There doesnt seem to be a way to statically assign a fixed drive letter to the USB flash drive when it is inserted into the USB port.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:28:22+00:00Added an answer on May 23, 2026 at 9:28 am

    I would set the volume name of the disc, and examine all connected drives and find the drive with that volume name. Here’s how I do it in PowerShell:

    param([parameter(mandatory=$true)]$VolumeName,
          [parameter(mandatory=$true)]$SrcDir)
    
    # find connected backup drive:
    $backupDrive = $null
    get-wmiobject win32_logicaldisk | % {
        if ($_.VolumeName -eq $VolumeName) {
            $backupDrive = $_.DeviceID
        }
    }
    if ($backupDrive -eq $null) {
        throw "$VolumeName drive not found!"
    }
    
    # mirror 
    $backupPath = $backupDrive + "\"
    & robocopy.exe $SrcDir $backupPath /MIR /Z
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like any other hard disk, virtual hard discs (*.vhd) will suffer from fragmentation. So
According to wiki, VHD (Virtual Hard Disk) may contain what is found on a
I have Virtual PC 2007. I am writing a C# program that will run
I have a virtual host setup on Apache 2 like so (simplified): <VirtualHost *>
I have a virtual path (example: ~/Images/Banner.jpg) and I want to make that an
I have a virtual machine running windows 2003 server. It is on a separate
I have a program that loads a file (anywhere from 10MB to 5GB) a
Recently I have purchased a notebook that came with Windows Home Basic (that don't
By an impure virtual function, I mean pure virtual functions that also have implementations
I need to create a virtual file, a file that if some program access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.