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

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


Thanks,
Reply
#2
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
Thank you very much Sreekanth..Smile
Reply
#4
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,691 03-07-2018, 01:09 AM
Last Post: nishitd
  code for validation to create a sub folder smiley 0 1,885 10-19-2016, 10:08 PM
Last Post: smiley
  [UFT] Close opened folder robertosalemi 1 3,877 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Run scripts from folder badri 1 3,322 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 4,257 02-25-2014, 02:04 PM
Last Post: guin.anirban

Forum Jump:


Users browsing this thread: 1 Guest(s)