Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i use Now statement to create folder
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Frds,

Can i know the script for create a folder with Current date.


Thanks,
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Kishore,

Here we go !!

Code:
Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.CreateFolder("c:\"&replace(replace(now,"/","-"),":","-"))
   NewFolder_Path= f.Path
   NewFolder_Name=f.Name
   msgbox NewFolder_Path
   msgbox NewFolder_Name
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Thank you very much Sreekanth..Smile
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Code:
Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.CreateFolder("c:\New Folder")
   CreateFolderDemo = f.Path
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Executing via create "RES"xx folder? nishitd 0 1,245 03-07-2018, 01:09 AM
Last Post: nishitd
  code for validation to create a sub folder smiley 0 1,540 10-19-2016, 10:08 PM
Last Post: smiley
  [UFT] Close opened folder robertosalemi 1 3,334 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Run scripts from folder badri 1 2,819 11-26-2014, 06:18 PM
Last Post: vinod123
  QTP 11 - CreateFolder fails to create folder in shared network drive from Windows 7 Pallavi 3 3,597 02-25-2014, 02:04 PM
Last Post: guin.anirban

Forum Jump:


Users browsing this thread: 1 Guest(s)