Need some help batch file

May 1, 2009 at 12:02:16
Specs: many, 1.4
Hope someone has a minute.

I am using a usb flash drive.
The drive letter will change from computer to computer, so i need a do the following

I want to copy a safety.odt to a desksk top
win 2k and xp...from the flash drive

3. 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

See More: Need some help batch file

Report •

May 2, 2009 at 04:14:50
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 EnableDelayedExpansion

for %%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.


Report •

May 2, 2009 at 19:07:38
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,


Report •

Related Solutions

Ask Question