Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hope someone has a minute.
1.
I am using a usb flash drive.
The drive letter will change from computer to computer, so i need a varible...to do the following2.
I want to copy a safety.odt to a desksk top
win 2k and xp...from the flash drive3. I want to update files on usb flash drive from server at \\gfgcf\loadset gfgcf_xp_loadset_cd to usb loadset dir.
Thank you for your time

It seems the first hump to get over is finding the drive letter for the flash. The volume serial is assigned when the drive is formatted and usually won't change.
================================
:: get letter of flash drive by vol
@echo off > newfile & setLocal EnableDelayedExpansionfor %%d in (d e f g h i) do (
vol %%d: > nul 2> nul
if !errorlevel! equ 0 (
for /f "tokens=5 skip=1" %%s in ('vol %%d: 2^> nul') do (
if %%s equ 90E7-569C set FD=%%d:
)
)
)echo flash is !FD!
=====================================
If at first you don't succeed, you're about average.M2

Thank you for the reply and the bat.
I have copied and pasted it as tomorrow.Sunday I am going into the foundation to do some work and will check it out.The reason for this is there are a number of volunteers...with flash drives and they need to be able to update the programs on the drives.
Trying to make life as simple as possible.......If a person gives 8 hrs a week freely to build computers for kids , the least one can do is make it simple to get the programs that are to be loaded easy to update..
Thank you again,
W.L.

![]() |
.bat to seperate records ...
|
Batch file to sort by fil...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |