Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


A little Create from filename, copy, then delete script needs help bigtime

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> A little Create from filename, copy, then delete script needs help bigtime
  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 >>
 A little Create from filename, copy, then delete script... - 10/31/2006 1:51:02 AM   
  Corrupter

 

Posts: 1
Score: 0
Joined: 10/31/2006
Status: offline
Hey guys, im a starting out newbie, mainly from need not nesscarily passion, but the rewards of this seem endless so who knows maybe i'll get into it.

Regardless i took a super tiny bit of Visual Basic in school and am having a hard time remembering a darn thing.  Regardless i wanted to make a script that would do the following and below i'll show you what i came up with so far.

1) Should run automatically in any directory its ran in so its default working path is the directory and drive its run from.
2) Should create a directory from file names in that directory.  However it will only look at the first portion of the filename up to a - entry.  (used primarily in mp3 files)
3) Should copy files into the directory that it just used to create them.
4) Should then delete the files that were copied into their respective directory.

i know there was more i had to do, about defining the variables or something, im doing some more research at vbexplorer.com but i figured i could get some hints from you guys that might steer me in the right direction.

Private Sub Form_Load()
Dim madedir
Dim filefound
If filefound = "*.mp3" Then
MkDir filefound
FileCopy "filefound", "madedir"
Kill "filefound"

End Sub
 
 
Post #: 1
 
 RE: A little Create from filename, copy, then delete sc... - 10/31/2006 2:01:56 AM   
  ebgreen


Posts: 4970
Score: 31
Joined: 7/12/2005
Status: offline
There are examples of pretty much all the things that you want to do in these fora. I would suggest reading the Read Me First post that is pinned at the top of this forum. That will give you some basic information. Next I would suggest writing out exactly what you want to accomplish as a step by step procedure. Once you have that algorithm created, we can suggest search terms that will let you find examples of doing all the pieces of your algorithm.

_____________________________

"... 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 Corrupter)
 
 
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 >> A little Create from filename, copy, then delete script needs help bigtime 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