How to copy files on the USB key using batch script even if the drive letter for the USB v.

Hello!
I am trying to create a batch file that will copy: C:\My Folder\myfile.txt on a USB key. I created the file "Tango.spe" on the USB and used the "If exist' readers in order to search for the file on USB connected." "

Here is my code so far:

off @echo

If exist D:\Tango.spe set variable = % BKPDRV %

If exist E:\Tango.spe set variable = % BKPDRV %

If exist F:\Tango.spe set variable = % BKPDRV %

If exist G:\Tango.spe set variable = % BKPDRV %

If exist H:\Tango.spe set variable = % BKPDRV %

If exist I:\Tango.spe set variable = % BKPDRV %

If exist J:\Tango.spe set variable = % BKPDRV %

If exist K:\Tango.spe set variable = % BKPDRV %

If exist L:\Tango.spe set variable = % BKPDRV %

If exist M:\Tango.spe set variable = % BKPDRV %

xcopy/y/i/h/k/e 'C:\My Folder\myfile.txt' % BKPDRV %


Can someone tell me what I am doing wrong?

Thanks in advance :)
Andes

Salvation, Andes,
Please go to the Microsoft Community Forums.
 
This problem would be better suited to the MSDN Forums community.
Please visit the link below to find a community that will provide the support you want.
http://social.msdn.Microsoft.com/forums/en-us/categories
 
Thank you.

Tags: Windows

Similar Questions

  • How to compress files after backup is finished in batch script

    Original title: files compressed
    How to compress files after backup is finished in batch script

    Hello

    Thank you for visiting the Microsoft answers community site. It is better suited for the IT Pro TechNet public. Please ask your question in the TechNet Windows 7 Scripting forum.

    http://social.technet.Microsoft.com/forums/en-us/iTCG/threads

    I hope this helps.

  • How to copy files to a USB flash drive - it would be a version of Windows XP Home Edition 5.1 to/for a Windows Vista laptop?

    How to copy files to a USB flash drive - it would be a version of Windows XP Home Edition 5.1 to/for a Windows Vista laptop?

    Via Explorer - copy / paste
    If the data files are the windows version does not matter

  • BlackBerry smartphone how to copy files from the PC to BB

    How to copy files from the computer to the BlackBerry 9700?  I have a couple of Word and Excel files, I like to keep it with me on the BB.

    Thank you.  I didn't know that I had to hit edit.  I have never when I had my iPaq.

  • Import a csv file to workspace root folder using Batch script

    Hello

    I usually use LCM to export/import from one instance to another in my planning and HSS and Reporting objects.

    Here, I have a specific requirement where I want to import couple of CSV file from a path on the server specified in the root directory of the workspace that is accessible to users similar to other FR and IR reports.

    I was looking for a utility to import or batch scripts I use to import the file to specific path from the server to the folder root of the workspace. \

    any help?

    -KP

    Checkbox Oracle - Hyperion Labs...: upload files in bulk of permissions in the workspace he wrote for the pdf files, but you can change it

    Concerning

    Celvin

  • [Q] how to copy files with the untouched directory structure of search results of Win7?

    Hello, I'm trying to easily copy a group of files found via a search in Windows 7 on another drive, but keep their structure intact directories, i.e.:

    1. search and find files in this directory:
    c:\Testing\My Files\file *. *
    c:\Testing\My Files2\file *. *

    2 copy the search results
    3. stick to
    d:\Testing\My Files\file *. *
    d:\Testing\My Files2\file *. *

    You would think there would be a toggle or a framework of Ontario Regulation or something similar to get there.  I can understand the need to make a copy of flat file as it does now... but is there a way to preserve the folder structure when copying?  Thank you-

    It's perhaps too tedious for you.

    You might select all search results and then shift-right click, select copy in the path. Paste the paths in Word and replace the entire paragraph is back with the Xcopy command for example

    Replace

    ^ p

    with

    "" F:\DestinationFolder/s ^ p xcopy ".

    If you intend to do a lot, you can have a blank Word document with a macro to do the work for you. You would need to remove the last line it will be just a part with 'xcopy' with no file name.

    You can then paste the final results in a batch file.

  • I need to copy files from my USB DRIVE to the vmserver running RHEL 5

    I need to copy files from my USB DRIVE to the VMSERVER running RHEL 5

    I can tether the drive to my host, but my VMserver does not see the drive.

    Is there some way to copy files from to the VMserver USBDISK create through vSphere, ESXi

    bndwork

    Moved to VMware Server------General questions forum.

    Dave

    VMware communities user moderator

    Now available - vSphere Quick Start Guide

    You have a system or a PCI with VMDirectPath?  Submit your specifications to Officieux VMDirectPath HCL.

  • Impossible to copy files to the Sansa Fuze using Windows 7 (drag and drop, or Windows Media Player)

    Hello

    Yesterday, I bought the Sansa Fuze and I have problems copying files to the device using either Windows Media Player (Sync) or Drag and Drop (Explorer).

    The symptoms are:

    (1) the device is recognized and available in Windows 7 (Series USB MSC - sorry don't have it with me right now)

    (2) took me to upgrade to the latest firmware, which has worked flawlessly

    (3) when I try to drag and drop a file on the device (I use Windows 7, 64-bit), it starts, but doesn't seem to calculate the size of the files or waiting time to download correctly.  It is followed by a slow progressive, until the computer crashes, resulting in a constant 100% of the CPU.  The only solution is a hard reboot

    (4) when you use Windows WM, the device is recognized, okay and the synchronization starts, but it then stops without reason.  Once again, the processor springs and requires a reboot

    (5) using the results 3 and 4 in 1-5 files being copied across, but not more.

    (6) I tried several albums and one album at a time, but cannot determine if that makes a difference.

    Help, please!

    See you soon,.

    Richard

    It may be a bug in Windows 7. But one thing to try is to go to the Device Manager (assuming that Windows 7 still has), uninstall the "rocket" (under USB controllers), and then run add hardware to find and reinstall the driver.

    Use the MTP with Windows Media Player mode, MSC mode without.

  • How to copy "Files on your computer" on a DVD or another hard drive?

    Using Vista Pro, hard drive ok. How can I copy files "folders on your computer" to a safe place of DVD or another hard drive. Motherboard broken will be replaced.

    * original title - copy "MSN 10" "files on your computer ' * '"»

    Hello

     

    Like you said motherboard broken will be replaced, then how access your computer?

    I suggest you follow the link to find out how to copy files and folders below.

    http://Windows.Microsoft.com/en-us/Windows-Vista/copy-a-file-or-folder

  • Unable to install Windows Vista, the system freezes at copying files and the extension of the files

    Original title: Setup error

    So I installed window vista Ultimate edition on my Mac, like two windows. I backed up all of my hard drives. so when I started to install everything went well until when it came in part from extension of files and copy files to the * something *. After like 20 minutes I had this error saying could not complete the installation because of corrupted files or something and then he is out. I tried homebasic, home premium etc. but I received an error even for each other. I went to the dealer where I bought the cd, returned and got another but still have the same thing

    Hello

    ·        What are your system specs?

    ·        How you try to install windows vista on the system? After the start of the desktop?

    ·        What is the exact error message that you experience when the system hangs during the installation?

    I suggest you to disconnect all external devices that are connected to the system such as (printers, scanners, etc.) and see if the problem is resolved.

    This occurs mainly, if the system (hardware or software) is not compatible with the operating system that you are trying to install on the system. I suggest you to format the partition in which you try to install Windows Vista, and then check if you are able to install the operating system or not.

    Installation and reinstallingWindows Vista

    http://Windows.Microsoft.com/en-us/Windows-Vista/installing-and-reinstalling-Windows-Vista

    I suggest you to check the below link.

    http://social.technet.Microsoft.com/forums/en-CA/itprovistadeployment/thread/6cb6510d-3e4f-4611-ba73-7e68fc4aa0a6

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to copy and paste the touchpad on a Toshiba portable computer Satellite C655 S5505 windows 7?

    OT:touchpad.

    Hello, can you please suggest how to copy and paste the touchpad on a Toshiba portable computer Satellite C655 S5505 windows 7.

    It worked a few days ago... I don't know what I did so that it does not work right. I like to copy and paste when right or click with the left button of the touchpad... They have a key on the Panel of key with copy and paste and cancel and cut options next to the bar area to the right of the ALT key with lines and an arrow on the key... Always like the old mode right click and copy and paste from the touchpad... Thank you

    Hello

    Check with the manufacturer of system support, documentation in line, or forums as there probably
    are shortcut keys that enable and disable the touchpad functions.

    Toshiba has also map of keys which allow easy adjustment of the TouchPad. See support for Toshiba
    and Forums. The key shortcut for the TouchPad, if they are responsible in the Fn + F9 or see the key card
    So usually loaded at the top of the screen.

    There is also usually a TouchPad control utility that loads in the Notification area next to the clock
    at the bottom right.

    Toshiba - Forums
    http://laptopforums.Toshiba.com/

    Toshiba - Contacts
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/navShell.jsp?CF=su_contact

    Toshiba - drivers - access your model
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp?NAV=download

    Toshiba - Support
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp

    Parameters for TouchPad located in the control panel - mouse (there may be several tabs with TouchPad
    entries) and some have a utility that loads in the Notification area next to the clock in the bottom right.

    ==========================================

    This utility also allows to control the TouchPad:

    TouchFreeze
    http://code.Google.com/p/TouchFreeze/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • How to copy and paste the image parameters to image with ACR 9.1.1

    How to copy and paste the image parameters to image with ACR 9.1.1

    Hi nicholast15140269

    • You can save the current settings of the image or can save them outside in the form of XMP file. Then use as a preset.

    Concerning

    ~ Assani

  • How archivelog ASM files through the nodes

    Hello
    I need to copy the archivelogs of an ASM to another node.

    MetaLink Note: How copy ASM files between nodes [ID 1147859.1] shows how in the 11g version.

    I would like to know how to do on = > 10 gr 2 < =.

    Since the 11g version of metalink:
    Oracle 11g Release 1 and Release 2 allows you to copy files across the network with the RMAN Active File Copy feature.   
    This feature is controlled with the 'AUXILIARY FORMAT' option to the backup command.  
    
    For example, you can copy an archivelog like:
    
    connect target SYS/...@srcinst # source system
    connect auxiliary SYS/...@destinst # destination system
    backup as copy reuse
    archivelog like "/u01/oracle/archivelog/arc_des/arch%.arc"
    auxiliary format "+RCVAREA" ;

    I believe in 10g, there is no way except to use the package dbms_file_transfer+ to do.
    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_ftran.htm#CHDEFEGG

    HTH
    Aman...

  • I spilled coffee on my Macbook Air and does not illuminate.  How to transfer files from the external hard drive to backup my new Macbook Air?

    I spilled coffee on my Macbook Air and does not illuminate.  How to transfer files from the external hard drive to backup my new Macbook Air?

    If you had a Time Machine backup, you can use the Migration Wizard and connect your new Mac on the external drive which has the Time Machine backup: move your content to a new Mac - Apple Support

  • How to copy pictures from the laptop to an ipad

    How to copy pictures from the laptop to an ipad

    Hello

    Try the methods suggested in the article below and check after each method:

    iOS and iPod: syncing photos via iTunes: http://support.apple.com/kb/HT4236

    If the problem persists, I suggest you to contact the Support of Apple IPad team.

    http://www.Apple.com/support/iPad/contact/ 

     

    Kind regards.

Maybe you are looking for