ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filecopy - Do you need to specify Destination Filename? (https://www.excelbanter.com/excel-programming/336798-filecopy-do-you-need-specify-destination-filename.html)

Andibevan[_4_]

Filecopy - Do you need to specify Destination Filename?
 
Hi All,

When using the method to copy files I get an error "Path Not Found"

Filecopy "C:\Temp\t1\New Text Document.txt", "C:\Temp\"

Do you have to specify the name of the destination file when copying
individual files or can I use just the path?

Ta

Andi



Bob Phillips[_6_]

Filecopy - Do you need to specify Destination Filename?
 
Andi,

From help.

Required. String expression that specifies the target file name. The
destination may include directory or folder, and drive.

So it looks like the answer is yes, it does need a file name, but the path
is optional.

--
HTH

Bob Phillips

"Andibevan" wrote in message
...
Hi All,

When using the method to copy files I get an error "Path Not Found"

Filecopy "C:\Temp\t1\New Text Document.txt", "C:\Temp\"

Do you have to specify the name of the destination file when copying
individual files or can I use just the path?

Ta

Andi





Andibevan[_4_]

Filecopy - Do you need to specify Destination Filename?
 
I did read the help but it didn't make much sense to me (no change there
then :-))
"Bob Phillips" wrote in message
...
Andi,

From help.

Required. String expression that specifies the target file name. The
destination may include directory or folder, and drive.

So it looks like the answer is yes, it does need a file name, but the path
is optional.

--
HTH

Bob Phillips

"Andibevan" wrote in message
...
Hi All,

When using the method to copy files I get an error "Path Not Found"

Filecopy "C:\Temp\t1\New Text Document.txt", "C:\Temp\"

Do you have to specify the name of the destination file when copying
individual files or can I use just the path?

Ta

Andi







Andibevan[_4_]

Filecopy - Do you need to specify Destination Filename?
 
I did read the help but it didn't make much sense to me (no change there
then :-))

Thanks Bob

"Bob Phillips" wrote in message
...
Andi,

From help.

Required. String expression that specifies the target file name. The
destination may include directory or folder, and drive.

So it looks like the answer is yes, it does need a file name, but the path
is optional.

--
HTH

Bob Phillips

"Andibevan" wrote in message
...
Hi All,

When using the method to copy files I get an error "Path Not Found"

Filecopy "C:\Temp\t1\New Text Document.txt", "C:\Temp\"

Do you have to specify the name of the destination file when copying
individual files or can I use just the path?

Ta

Andi









All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com