views:

36

answers:

2

Hi, I have a folder named as 2010. In this I want a folder for each month like "Jan10", "Feb10"....."Dec10" In each month folder I want to create folder for "Todays date"

I have create a shortcut for that 2010 folder with Target as

C:\WINDOWS\explorer.exe /n, /e, /select, F:\2010

I want a functionality that will execute when I click the shortcut for f:\2010 icon.

Any pointer would be great help.

A: 

On Windows, VBScript is your friend. I am unsure of how to get dates, etc. but I can tell you how to create a folder:

set s = wscript.createobject("scripting.filesystemobject")
s.createfolder("FOLDER NAME")
Delan Azabani
How to execute this script on the click of shortcut?
Ram
A: 

Following script did trick for me

strMonth = MonthName(Month(date))
strYear = Year(Date)
FolderName = "F:\Test\" & strYear &"\" & strMonth & "\" & Day(date) & " " & strMonth 
Set SH = WScript.CreateObject("WScript.Shell") 
CreateSubFolder( FolderName )

Sh.Run """" & FolderName & """", 3, False
Set SH = Nothing 


Function CreateSubFolder(strFolder)

  Dim posSubFolder, strParentFolder, objSFC

  Set objSFC = CreateObject("Scripting.FileSystemObject")


If Not (objSFC.FolderExists(strFolder)) then

set fl =     objSFC.CreateFolder(strFolder)

  End If

End Function

Ram