Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a VB Expert!

Join 244,283 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,134 people online right now. Registration is fast and FREE... Join Now!




file copying based on variables

 
Reply to this topicStart new topic

file copying based on variables, file copying based on variables

detlion1643
4 Nov, 2008 - 08:19 AM
Post #1

New D.I.C Head
*

Joined: 4 Nov, 2008
Posts: 15



Thanked: 1 times
My Contributions
Hi there,

I am developing an application that will help us clean up some of our file structures. I currently have 2 folders in place: c:\test1 and c:\test2.

test1 has multiple files with everything named differently and all having different extensions.
test2 is empty for the time being.

I am trying to pull out all the files from test1 that match the .mpeg extension and copy them into the test2 folder.
Along with copying them though, i will need to look at a creation date for the .mpeg files and rename them based upon the month and day that the creation time lists. The renamed file will show in test2 and the original file still in test1 untouched.

It doesn't seem like a lot, but i have been piecing information from all different sources and nothing is making sense in my mind.

I am seeking some help (the only code i have is commented out, but it never worked from the start)

User is offlineProfile CardPM
+Quote Post


dmcollette664
RE: File Copying Based On Variables
8 Nov, 2008 - 12:45 PM
Post #2

New D.I.C Head
*

Joined: 13 Sep, 2008
Posts: 13

Hello,

To help weed out your mpeg files, you will need to do something like this:

CODE

set objfso = wscript.createObject("Scripting.FileSystemObject")
If file.type = "movie clip" and file.size >0 then
  objfso.CopyFile "C:\ from file path", "c:\ to file path"



You may get more than just the mpeg, you may get other movie clips in your folder since windows has other file associations with movie clip, but that should give you a start. Hppe this at least gives you a starting point.
User is offlineProfile CardPM
+Quote Post

thava
RE: File Copying Based On Variables
8 Nov, 2008 - 06:30 PM
Post #3

D.I.C Addict
Group Icon

Joined: 17 Apr, 2007
Posts: 670



Thanked: 35 times
Dream Kudos: 75
My Contributions
one suggesstion

create a batch file in vb6

using the directory list and filelist and execute the batch

we want to help you for that you must just make a small effort and post your effort here then only we give you a beter and perfect help

This post has been edited by thava: 8 Nov, 2008 - 06:31 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 02:21PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month