site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Posting?
Post a:
Post a:
Links: ·How To Get Noticed ·Web Monks FAQ ·Webhosting FAQ ·Posting Code ·How To Post ·Webhosting forum
AuthorAll Replies


GILXA1226
Premium,MVM
join:2000-12-29
London, OH

reply to R2

Re: Autorun.inf programing

said by R2:

I want to write a program/script that copies that contents of a Flash Drive to a specific folder on the hard drive as soon as the Flash drive is inserted.

I have the tools to create the autorun.inf file, but I need to make sure that the file designed to run on insertion copies the contents like I want.

For example, can I use CMD file to do this? If so, how do I have it figure out the drive letter of the Flash drive?

Any thoughts are appreciated. Thanks.
My first thought would be to find a CD that had an autorun.inf file on it and use that as a base.


R2
R Not
Premium,MVM
join:2000-09-18
Long Beach, CA
kudos:1

4 edits

I can write the autorun file and I can tell it WHAT to run -- I just need to make sure that the file I tell it to run will actually COPY the flash drives contents to a folder on the hard drive. I don't think many CD's do that...

Something as simple as:

Copy D: C:\MyFlash
 
BUT... that will fail because the Flash drive will NOT always be the D: drive. I need to be able to say "copy THIS drive to a folder on the C: drive."

I want this to work on multiple computers.


jayco437
Premium
join:2001-08-11
Lincoln, NE

Have looked at something like this:

»autorun.moonvalley.com/relative_···aths.htm

Put everything in a folder on the stick, and try using a relative path, such as .\MyUSBFolder\



R2
R Not
Premium,MVM
join:2000-09-18
Long Beach, CA
kudos:1

3 edits

That looks very promising - thanks. I believe I can use wildcards (*) also. I will give it a try. Thanks.
_________

And do I want xcopy? I'll check it out.
_______________

Forgive my ignorance. I tried this - and it works - sort of:

xcopy /S *.* C:\temp
 
But I get hit with this:
Does C:\temp specify a file name
or directory name on the target
(F = file, D = directory)? d
 
How do avoid that message? ANSWER - add a backslash at the end!!

And it looks like I need to use short file names, correct?

Thursday, 31-May 04:43:18 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics