Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Copying File with no extension

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61860
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Copying File with no extension
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Copying File with no extension - 6/25/2008 8:16:41 AM   
  Eddieduce

 

Posts: 15
Score: 0
Joined: 6/17/2008
Status: offline
I am attempting to copy a file that does not have an extension but I was originaly using 'CopyFolder.'

I was using the line:

fso.copyFolder "c:\<Folder1>\<SubFolder1>\<Sub2>\<Sub2>\<Sub3>\<Myfile with no extension>", "H:\<Folder1>\<SubFolder1>\<Sub2>\<Sub2>\<Sub3>\", "True"

I get the message "Err# 76 - Path not found"

From what I have written, it seems like I am telling the machine to copy a folder with my file name.

When I change the original file to "MyFile.exe" and change my code line to reflect this, it works perfectly.

I have seen a GetFile statement but am not familiar with it. Is that what I am supposed to substitue the CopyFolder with?

What am I doing wrong?

< Message edited by Eddieduce -- 6/25/2008 8:20:07 AM >


_____________________________

Ed
 
 
Post #: 1
 
 RE: Copying File with no extension - 6/25/2008 8:22:05 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
If you are copying a file why are you using the CopyFolder method? Why not use the CopyFile method?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Eddieduce)
 
 
Post #: 2
 
 RE: Copying File with no extension - 6/25/2008 10:02:47 AM   
  Eddieduce

 

Posts: 15
Score: 0
Joined: 6/17/2008
Status: offline
Itworked. I was not wanting to use it and mess something up since I was not familiar with it.

Thanks.

_____________________________

Ed

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Copying File with no extension Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts