Problem with ShFileOperation

  • Thread starter Thread starter Sonnich Jensen
  • Start date Start date
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
 
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
 
"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.
 
"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
 
Back
Top