FileCopy Error 52 Bad FileName or number 
Author Message
 FileCopy Error 52 Bad FileName or number

Hi

I'm trying to copy a file from a source to a destination, but whatever I
try, I get error 52 bad filename or Number. I use Filecopy and a generated
string as destination, here's an example:

Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
Destination = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

FileCopy SourceFile, DestinationFile

Can anyone tell me what I'm doing wrong here?

Thanks



Mon, 19 Dec 2005 23:08:26 GMT  
 FileCopy Error 52 Bad FileName or number
Hi Marco,

You haven't defined the SourceFile or DestinationFile parameters that you
use for the FileCopy statement.

Try the following:

SourceFile = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
DestinationFile = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

FileCopy SourceFile, DestinationFile

HTH


Quote:
> Hi

> I'm trying to copy a file from a source to a destination, but whatever I
> try, I get error 52 bad filename or Number. I use Filecopy and a generated
> string as destination, here's an example:

> Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> Destination = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

> FileCopy SourceFile, DestinationFile

> Can anyone tell me what I'm doing wrong here?

> Thanks



Mon, 19 Dec 2005 23:28:27 GMT  
 FileCopy Error 52 Bad FileName or number
Dave

I did difine the SourceFile and DestinationFile in the two lines above the
FileCopy line

Marco


Quote:
> Hi Marco,

> You haven't defined the SourceFile or DestinationFile parameters that you
> use for the FileCopy statement.

> Try the following:

> SourceFile = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> DestinationFile =

"D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"
Quote:

> FileCopy SourceFile, DestinationFile

> HTH



> > Hi

> > I'm trying to copy a file from a source to a destination, but whatever I
> > try, I get error 52 bad filename or Number. I use Filecopy and a
generated
> > string as destination, here's an example:

> > Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> > Destination = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

> > FileCopy SourceFile, DestinationFile

> > Can anyone tell me what I'm doing wrong here?

> > Thanks



Tue, 20 Dec 2005 01:20:11 GMT  
 FileCopy Error 52 Bad FileName or number
Hi Marco,

Was the sample code you provided an exact copy? In the code you provided

Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
Destination = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"
FileCopy SourceFile, DestinationFile

you defined Source and Destination, but not SourceFile and DestinationFile.

If the sample code you provided is not an exact copy, can you provide one?

HTH


Quote:
> Dave

> I did difine the SourceFile and DestinationFile in the two lines above the
> FileCopy line

> Marco


> > Hi Marco,

> > You haven't defined the SourceFile or DestinationFile parameters that
you
> > use for the FileCopy statement.

> > Try the following:

> > SourceFile = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> > DestinationFile =
> "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

> > FileCopy SourceFile, DestinationFile

> > HTH



> > > Hi

> > > I'm trying to copy a file from a source to a destination, but whatever
I
> > > try, I get error 52 bad filename or Number. I use Filecopy and a
> generated
> > > string as destination, here's an example:

> > > Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> > > Destination =

"D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

- Show quoted text -

Quote:

> > > FileCopy SourceFile, DestinationFile

> > > Can anyone tell me what I'm doing wrong here?

> > > Thanks



Tue, 20 Dec 2005 02:22:45 GMT  
 FileCopy Error 52 Bad FileName or number
Hi Dave,

I misspelled my code in the example, it should be like this:

SourceFile = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
DestinationFile = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"
FileCopy SourceFile, DestinationFile



Quote:
> Hi Marco,

> Was the sample code you provided an exact copy? In the code you provided

> Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> Destination = "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"
> FileCopy SourceFile, DestinationFile

> you defined Source and Destination, but not SourceFile and
DestinationFile.

> If the sample code you provided is not an exact copy, can you provide one?

> HTH



> > Dave

> > I did difine the SourceFile and DestinationFile in the two lines above
the
> > FileCopy line

> > Marco


> > > Hi Marco,

> > > You haven't defined the SourceFile or DestinationFile parameters that
> you
> > > use for the FileCopy statement.

> > > Try the following:

> > > SourceFile = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> > > DestinationFile =
> > "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

> > > FileCopy SourceFile, DestinationFile

> > > HTH



> > > > Hi

> > > > I'm trying to copy a file from a source to a destination, but
whatever
> I
> > > > try, I get error 52 bad filename or Number. I use Filecopy and a
> > generated
> > > > string as destination, here's an example:

> > > > Source = "D:\Projecten\Shell\SPDC\EDMS\test.txt"
> > > > Destination =
> "D:\Projecten\Shell\SPDC\EDMS\test\DEE\DMP\CodeB\test.txt"

> > > > FileCopy SourceFile, DestinationFile

> > > > Can anyone tell me what I'm doing wrong here?

> > > > Thanks



Tue, 20 Dec 2005 21:24:11 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. run time error "52": bad file name or number

2. Bad file name or number error 52

3. Setup caused runtime error 52 - bad file name or number

4. Bad file name or number error 52

5. Run-time error '52': Bad file name or number

6. Error 52 - Bad file name or number

7. error 52 invalid filename or number

8. Error 52 on FileCopy

9. Error 52 on FileCopy

10. Bad Filename or Number Error

11. Error - Bad Filename or Number

12. Error 52 as indicator of Network Error???

 

 
Powered by phpBB® Forum Software