473,497 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create a folder with mm/dd/yyyy/hh/mm

anoble1
245 New Member
I currently have a database backup button in my database. It grabs the database where it currently is, and makes a copy of it, then makes a new folder with the Month day year. Well, I do multiple updates daily (and space is not an issue). So, question is, can you have access make and name a new folder with hours and minutes?

Expand|Select|Wrap|Line Numbers
  1. 'Customer Issues BACKUP
  2.  
  3. Set fso = CreateObject("Scripting.FileSystemObject")
  4.  
  5. Rootpath = "S:\Workgroups\APC Power Delivery-Contract Services\Student Engineer\Customer Issues\Customer Issues BACKUPS\" & Month(Date) & "-" & Day(Date) & "-" & Year(Date) & "\"
  6.  
  7. If Not (fso.FolderExists(Rootpath)) Then fso.CreateFolder (Rootpath)
  8.  
  9. Shell "xcopy " & """" & Rootpath & """" & " " & """" & Rootpath & """" & " /e /y"
  10. Shell "xcopy " & """" & "S:\Workgroups\APC Power Delivery-Contract Services\Customer Issues\Customer Issues.mdb" & """" & " " & """" & Rootpath & """" & "/y"
  11.  
  12. Exit Sub
  13. End Sub
  14.  
Sep 3 '10 #1
1 1397
beacon
579 Contributor
You can use hours and minutes by using the Time function, but you'll have to convert the time to a string and remove the semi-colon.

Personally, I would convert it to military time and use that in the file name.
Sep 3 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
17851
by: Dave | last post by:
I have an application where I am providing the user the ability to select or create a folder on a domain, using SHBrowseForFolder. When the user selects/creates a folder on a remote computer, it...
15
46421
by: tschi-p | last post by:
maybe my question is quite simple, but although searching like wild I cannot find a solution. I just want to append to a file, let's say to "c:\my folder\filename1.txt". Normally with...
2
12166
by: DCount17 | last post by:
I'm new to .NET and C#. I need help in trying to do the following: I need to use a URI (or something else) that allows all users of the application to be able to access a directory and create a...
1
2793
by: sajithm | last post by:
Hi all, I have a problem while trying to create folder and files in a remot storage server using asp.net. Actually I was trying with filesystem object and this says bad usernam and passeord,....
0
1248
by: Lars Netzel | last post by:
I'm creating a setup project for my application so that users will have a proper installation. In the installation I need to copy a database over to the clients D:\ partition and create a folder...
1
3965
by: deepaks85 | last post by:
Dear Sir, I have written a php script to create folder : <?php $targetpath = $_SERVER . "/reports/"; $target = $targetpath . basename( $_FILES); mkdir($targetpath.$vName,0700); ?>
0
2032
by: mrinalaryan | last post by:
create folder & upload file in the web server through web service-C# -------------------------------------------------------------------------------- im using web service to connect windows form...
2
1385
by: shona | last post by:
Hello friends.., I want to create folder on server from client machine using Asp.net... My problem is that i have done coding it run properly but whenever i ran that application from IIS...
1
5526
by: jags | last post by:
HI All I was trying to create Document librray programatically in a Sharepoint Site and is not working for me.I was trying to implement this as an Event Handler. The aim of the code is to create...
2
7954
by: Noorain | last post by:
sir how to create folder to use php script? i know how to file upload in folder to use php. but i can't how to create folder. i type name & its create my folder. Example: Type: test. my...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.