Problem with ShFileOperation

S

Sonnich Jensen

Not really C#, but

I use ShFileOperation for some operations, and found that I cannot
rename a file on a USB stick - the return code is 124, hence:

The path in the source or destination or both was invalid.

The files are:
f:\fie\99_hatluk\scrennshot.gif
to:
f:\fie\99_hatluk\screenshot.gif

and it exists.... so how come that I can check for the file existance,
but I cannot rename it from ShFileOperation

And yes - ShFileOperation work for files on networks drives and local
drives. Just on for USB sticks

Sonnich
 
A

Arne Vajhøj

Not really C#, but

I use ShFileOperation for some operations, and found that I cannot
rename a file on a USB stick - the return code is 124, hence:

The path in the source or destination or both was invalid.

The files are:
f:\fie\99_hatluk\scrennshot.gif
to:
f:\fie\99_hatluk\screenshot.gif

and it exists.... so how come that I can check for the file existance,
but I cannot rename it from ShFileOperation

And yes - ShFileOperation work for files on networks drives and local
drives. Just on for USB sticks

A few questions:
* the USB stick is not write protected?
* does File Move or FileInfo MoveTo work?

Arne
 
J

Jeff Johnson

"Arne Vajhøj" wrote in message
* the USB stick is not write protected?

How exactly DO you write protect a USB stick? I've never seen a tab or
slider or anything on any of the USB sticks I've ever owned to suggest it
was even possible.
 
G

Gene Wirchenko

"Arne Vajhøj" wrote in message


How exactly DO you write protect a USB stick? I've never seen a tab or
slider or anything on any of the USB sticks I've ever owned to suggest it
was even possible.

My first one had one, but most of the ones that I have seen, do
not.

Sincerely,

Gene Wirchenko
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top