Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


copy files from few folders(subfolders)

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> copy files from few folders(subfolders)
  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 >>
 copy files from few folders(subfolders) - 10/3/2008 5:00:32 PM   
  avipenina

 

Posts: 102
Score: 0
Joined: 4/24/2006
Status: offline
Hi,

can i make a script that can copy *.trn files from few folder into one destination folder,if file on the destination already exists do not copy that file?
i have a folder that called Backup and in that folder i've few subfolders that in every subfolder i've those *.trn files.

THX
 
 
Post #: 1
 
 RE: copy files from few folders(subfolders) - 10/3/2008 8:01:33 PM   
  htac

 

Posts: 12
Score: 0
Joined: 10/2/2008
Status: offline
Take a look at here:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct04/hey1020.mspx

Then you could a If-sentence like below; (just add the copying)

If lcase(Right(objfile.Name, 4)) = ".trn" Then
...
  iF not fso.FileExists ("\\destinationfolder\" & objfile.name) Then
 ...
  End If
...
End If

(in reply to avipenina)
 
 
Post #: 2
 
 
 
  

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 >> copy files from few folders(subfolders) 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