How to get the drive letter of a Volume using command prompt

Using windows command line tools i want to get the drive letter of a volume, by specifying its volume number.
For example i have a HDD with 2 volumes: Volume-0 and Volume-1
I want to set a Variable say 'Letter'=<Drive Letter> such as
SET Letter=<Command> <Volume Number>
Is there any command which can do this for me...
Thanks...

Hi,
You can use the diskpart tool to assign a drive letter to the drive by specifying the volume's number.
1.Open Command Prompt.
2.Type:diskpart
3.At the DISKPART prompt, type:list volume
Make note of the number of the simple volume whose drive letter you want to assign, change, or remove.
4.At the DISKPART prompt, type:select volume n
Select the volume, where n is the volume's number, whose drive letter you want to assign, change, or remove.
5.At the DISKPART prompt, type one of the following:assign letter=L
Where L is the drive letter you want to assign or change.
For more detailed information, you could refer to the article below:
Assign, change, or remove a drive letter
https://technet.microsoft.com/en-us/library/cc757491(v=ws.10).aspx
Best Regards,
Mandy 
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

Similar Messages

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to get the customize url of an portlet using PLSQL

    How to get the customize url of an portlet using PLSQL.

    Are you trying to call the portlet Customization form directly from the browser?

  • How to get the size of physical memory by using system call ?

    how to get the size of physical memory by using system call ?What system call can be used for me to get the size of physical memor? thanks.

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • How to get the job logs from sm35 by using the queue id and session name?

    hi all,
    can any one please let me know how to read the job log from sm35 by using the session name and queue id. i have the job name and job count but is it possible to download the job log by using the queue id and session name.
    FYI..
    i want to read this job log and i want to send it to an email id.
    -> i am using the job_open and submitting the zreport via job name and job count and then i am using the function module  job_close.
    but this is not working in my scenario i have the queue id and session name by using this two i want to get the job log is there any function module available or code please provide me some inputs.
    thanks in advance,
    koushik

    Hi Bharath,
    If you want to download it to the local file then you can follow the instructions in the below link.
    How to download Batch Input Session Log?
    Regards,
    Sachin

  • How to Get the Job, Cost center, Position description using select query

    Hi all,
    How to get the  Job, Cost center, Position description through select query without using the Function module?
    thanks,
    Prasad

    use adhoq query and take the report chose both text and value

  • How to get the complete definition of a table using SQL?

    How to get the complete definition code of a table using SQL?

    Something like this ?
    SQL> set long 10000
    SQL> set pages 200
    SQL> select dbms_metadata.get_ddl('TABLE','EMP') from dual;
    DBMS_METADATA.GET_DDL('TABLE','EMP')
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    SQL>Amardeep Sidhu

  • My iPhone getting stolen,how I get the actual location my iPhone way using the apps find my iPhone?

    My iPhone getting stolen,how I get the actual location the full address to find my iPhone way using the apps find my iPhone?

    If you set up the Find My iPhone service prior to your iPhone going missing - the app is for tracking a device from another iOS device - then there is a chance that can be tracked, though it depends on a number of factors (the iPhone is turned on, connected to either the 3G or a WiFi network, or has not had the Find My iPhone service disabled or the iPhone been completely restored). Log into icloud.com and go to the Find My iPhone section. If you did not set up Find My iPhone, check with your cell carrier. Some carriers offer their own tracking service, though you usually have to pay for it. 
    If your carrier does not offer such a service and you did not set up Find My iPhone, then there is no way to track the unit. Contact the police and change any passwords for any online accounts you may have used from your iPhone (the iTunes Store, for instance). 
    Regards.

  • How to retrieve the  drive letter of the current directory with an applet ?

    The subject says it all.
    I have this html file and when launched it should get the current drive's letter.
    This is how it's done in java, but I dunno how to make it in an applet version.
    import java.*;
    import java.io.File;
    public class test {
    public static void main (String args[]) {
    File dir1 = new File (".");
    String drive = new String();
    try {
    drive = dir1.getCanonicalPath ();
    char driveletter = drive.charAt(0);
    System.out.println ("Drive letter : " + driveletter);
    catch(Exception e) {
    e.printStackTrace();
    Thank you very much for any hint or any idea.
    Gihan.

    Found the solution, used getCodeBase.
    Thank you.
    Gihan.

  • How to get the driver win 7,macbook air.my os x is deleted

    help me

    It's not My way. You said you had Windows Only installed on your Mac, NO OS X at all, and how do you get the drivers for it. I explained how to do that. If you want to install Mac OS X back on the system then you will remove Windows when doing that.
    Windows can be installed all by itself on a Mac, which is what I think you have now, or you can have OS X first then by using boot camp assistant install Windows in it's own partition and have both OS X and Windows on your Mac. But if you first install Windows, all by itself (No OS X), then the only way to install OS X is to format the drive which will remove the Windows install.
    So the question is What Do "YOU" want to do? Have OS X all by itself? Have Windows all by itself? Or have both OS X and Windows on your Mac.

  • How to get the first letter in Name as INITAL

    I am trying to put the first letter of first name as INITIAL in a sp column but I am not able to get the exact result. Could anybody help me with that
    TIA

    Thanks for the reply
    But where do I find the LEFT in the formula field

  • How to get the first letter alone in Upper case?

    SQL*Plus: Release 9.2.0.1.0 - Production on Thu Jan 15 11:13:44 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options.
    Hi all,
    Sorry if i am posting this one as a clone. I want the first letter alone in UPPER case in the given data. Is there any specific SQL function to do it or can we do it in REGEXP?
    I have tried with this below one query.
    select Upper(substr('oracle code',1,1))||substr('oracle code',2) from dual;
    Oracle code
    Is anything better than this in performance wise? If so please help me.
    Thanks,
    Ram

    Hi,
    what if the string is like this
    SELECT INITCAP(substr('oracle code Error ', 1, instr('oracle code Error ', ' '))) ||
           substr('oracle code Error', instr('oracle code Error ', ' '), length('oracle code error '))
    FROM dual;

  • How to get the ESN of a Mobile Broadband using the mbnapi?

    Please let me know if there is a better forum to ask my question.
    I have created a VS 2010 C++ program to communicate in LAN, WWAN or WI-FI. The program runs under windows 7. In the previous release of this program, we were using QCWWAN2K.dll to communicate in WWAN but now the customer requested to use
    the Mobile Broadband API of windows 7 (mbnapi.h). Everything is working fine except the fact that I can't get the ESN number of the mobile broadband adapter. The function I am using is IMbnInterface::GetInterfaceCapability. This function should return the
    IMEI for GSM devices and ESN/MEID for CDMA devices. In my case, it's a CDMA device but it always return the MEID. I really need to get the ESN.
    Is anyone know how to do it?
    Thanks in advance.

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses the usage issue of Visual Studio IDE such as
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    I suggest you should consult your issues on
    Windows Hardware WDK and Driver Developmentforum like this thread:
    http://social.msdn.microsoft.com/Forums/en-US/92979260-4603-47f2-8d65-6100053f1691/how-to-use-the-imbndeviceservice-interface-to-operate-the-mobile-broadband-device?forum=wdk
    for better solutions.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get the selected entry from a Dropdown (using IF_WD_SELECT_OPTIONS)

    Hello,
    I created a Selection screen by adding attribute M_HANDLER of type IF_WD_SELECT_OPTIONS.
    This way I can create a selection screen with normal select-options.
    Now I added a parameter for a dropdown list. The Value set is passed correctly. No problem there. The values are filled and diplayed correctly.
    * add the SHIP-TO field to the selection
      DATA: ltp_text  TYPE string.
      DATA: lta_ship_to_table type WDY_KEY_VALUE_table,
            lwa_ship_to       like LINE OF lta_ship_to_table.
      DATA: context_node_ship_to_table TYPE REF TO if_wd_context_node.
    * get all declared attributes
      context_node_ship_to_table = wd_context->get_child_node( 'SHIP_TO_TABLE' ).
      context_node_ship_to_table->get_static_attributes_table(
        IMPORTING
          table  = lta_ship_to_table ).
      ltp_text = wd_assist->if_wd_component_assistance~get_text( 'L01' ).
      wd_this->m_handler_dlv->add_parameter_field(
                             i_id           = 'KUNWE'
                             i_description  = ltp_text
                             i_as_dropdown  = 'X'
                             it_value_set   = lta_ship_to_table
                             i_within_block = 'BLK1' ).
    The problem is to GET the selected value in the method that is called after clicking on the Search button.
    I tried using several methods, for example GET_PARAMETER_FIELD and GET_SELECTION_SCREEN_ITEMS.
    * Get the Ship-to
      DATA: ltp_kunwe       TYPE REF TO data.
      ltp_kunwe = wd_this->m_handler_dlv->get_value_of_parameter_field(
                                            i_id = 'KUNWE' ).
    * Assign it to a field symbol
      ASSIGN ltp_kunwe->* TO <fs_kunwe>.
    Result was INITIAL.
    DATA: lrf_get_selection_screen_items TYPE if_wd_select_options=>tt_selection_screen_item.
      wd_this->m_handler_dlv->get_selection_screen_items(
                  IMPORTING
                     et_selection_screen_items = lrf_get_selection_screen_items ).
    Result was INITIAL, although the table was retrieved with all values.
    wd_this->m_handler_dlv->get_parameter_field(
                                          EXPORTING
                                            i_id = 'KUNWE'
                                          IMPORTING
                                            e_value = ltp_kunwe ).
    Also INITIAL.
    It looks like I am missing a step (maybe to set lead selection for this field). What did I miss?
    How can I get to the value?

    Thanks!
    Problem solved:
    DATA: lr_value             TYPE REF TO data.
    CREATE DATA lr_value TYPE string.                     "<----  I was missing this code
      LOOP AT lta_ship_to_table INTO lwa_ship_to.
        value_set-key   = lwa_ship_to-key.
        value_set-value = lwa_ship_to-value.
    *    INSERT value_set INTO TABLE lt_value_set.
        append value_set TO lt_value_set.
      ENDLOOP.
      ltp_text = wd_assist->if_wd_component_assistance~get_text( 'L01' ).
      wd_this->m_handler_dlv->add_parameter_field(
                              i_description  = ltp_text
                              i_id           = 'KUNWE'
                              i_value        = lr_value   "<----  I was missing this code
                              i_as_dropdown  = abap_true
                              it_value_set   = lt_value_set
                              i_within_block = 'BLK1' ).
    I looked at that parameter, but thought is was only used to SET the value, not required to get it back as well. Because it IS an import parameter...

  • How to get the TransactionManager in a stateful EJB (using JPA toplink)

    I use weblogic 10.3
    This is my stateful EJB and I need to get the TransactionManager because I want to suspend my transaction...
    Here it is ok for the UserTransaction ut but I got an error with the TransactionManager
    EJB Code
    //@Stateless(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
    @Stateful(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
    @TransactionManagement(TransactionManagementType.BEAN)
    @Remote
    @Local
    public class MyFacadeEJBBean implements MyFacadeEJB, MyFacadeEJBLocal, Serializable {   
    @Resource javax.transaction.UserTransaction ut;
    @Resource javax.transaction.TransactionManager tm;
    Error Message at the deploy EJB
    Unable to deploy EJB: MyFacadeEJB from PocJTA-PEJB-ejb:
    [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
    weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'test.ejb.MyFacadeEJBBean/tm' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
         at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:639)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:247)

    Chpruvos,
    Hi, I ran into a similar issue when specifying WebLogic specific descriptors in ejb-jar.xml and the corresponding weblogic-ejb-jar.xml. I no longer use this approach in our example code - we just use annotations. see: http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Tutorial_Source
    My session bean is stateless - I don't know how much it will help with your statefull bean managed config but here are copies of the ejb.jar configuration xml I used to use. All the resource*ref elements (see the resource-description* element) ended up in the weblogic specific weblogic-ejb-jar.xml descriptor file.
    ejb-jar.xml
    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd]" version="3.0"&gt;
    *&lt;enterprise-beans&gt;*
    *&lt;session&gt;*
    *&lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;*
    *&lt;ejb-class&gt;org.eclipse.persistence.example.unified.business.ApplicationService&lt;/ejb-class&gt;*
    *&lt;session-type&gt;Stateless&lt;/session-type&gt;*
    +&lt;!-- default to CMP Container managed transations not BMP --&gt;+
    +&lt;!-- transaction-type&gt;Bean&lt;/transaction-type--&gt;+
    +&lt;!-- resource-env-ref id="ResourceEnvRef_1080980284303"&gt;+
    +&lt;resource-env-ref-name&gt;localOracle10RemoteDS&lt;/resource-env-ref-name&gt;+
    +&lt;resource-env-ref-type&gt;javax.sql.DataSource&lt;/resource-env-ref-type&gt;+
    +&lt;/resource-env-ref--&gt;+
    +&lt;!-- resource-ref&gt;+
    +&lt;res-ref-name&gt;localOracle10RemoteDS&lt;/res-ref-name&gt;+
    +&lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;+
    +&lt;res-auth&gt;Application&lt;/res-auth&gt;+
    +&lt;/resource-ref--&gt;+
    *&lt;/session&gt;*
    *&lt;/enterprise-beans&gt;*
    &lt;/ejb-jar&gt;
    weblogic-ejb-jar.xml
    &lt;?xml version="1.0"?&gt;
    &lt;weblogic-ejb-jar&gt;
    *&lt;weblogic-enterprise-bean&gt;*
    *&lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;*
    *&lt;stateless-session-descriptor&gt;*
    *&lt;pool&gt;*
    *&lt;max-beans-in-free-pool&gt;8&lt;/max-beans-in-free-pool&gt;*
    *&lt;initial-beans-in-free-pool&gt;2&lt;/initial-beans-in-free-pool&gt;*
    *&lt;/pool&gt;*
    *&lt;/stateless-session-descriptor&gt;*
    {color:#008000}&lt;resource-description&gt;
    &lt;res-ref-name&gt;localOracle10RemoteDS&lt;/res-ref-name&gt;
    &lt;jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name&gt;
    &lt;/resource-description&gt;
    &lt;resource-env-description&gt;
    &lt;resource-env-ref-name&gt;localOracle10RemoteDS&lt;/resource-env-ref-name&gt;
    &lt;jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name&gt;
    &lt;/resource-env-description&gt;
    {color}+&lt;!-- jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name--&gt;+
    *&lt;/weblogic-enterprise-bean&gt;*
    &lt;/weblogic-ejb-jar&gt;
    thank you
    /michael
    [http://www.eclipselink.org|http://www.eclipselink.org/]
    Edited by: michael_obrien on Feb 26, 2009 9:56 AM

Maybe you are looking for

  • How do I delete multiple contacts at once

    I want to delete some contacts and would like to know how to do it other than one at a time, is there a possible solution. The device I would like to do this from is a Iphone 5c.  Thank you in advance

  • How to track changes in j1id tranaction

    hi all,        I want to make a report by  tracking the changes made in the transaction <b>j1id</b> for certain period.     I am  entering transaction J1ID TRANSACTION  and selecting <b>chapter id</b> radio button and making some changes.   my questi

  • Spry:when and page draw

    go here: squarehead and select either print or illustration. After the data is loaded I set the current row to -1 and test for it with a spry:when statement. This loads a different div when the page is first served. There is a moment, however, when t

  • Oracle 9i install on SuSE 8.0 Pro failing

    I get the following error when I try to run the "runInstaller" script on SuSE 8.0. I'm following the Oracle 9i SuSE installation instructions, but can't find any reference to this error. Does anyone have any advice? $ ./Disk1/runInstaller Inconsisten

  • I need info about CL_XML_DOCUMENT

    Hi to all, I need info about the class CL_XML_DOCUMENT and his methods. I only have seen information of a few methods. Where can I find more information and examples of use about this class?