Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create a directory every Friday

Status
Not open for further replies.

impulse24

IS-IT--Management
Jul 13, 2001
167
US
Hi,

I have a programming running that is outputting excel spreadsheets. I want to create a new directory every Friday, and put only the spreadsheets that are created from Friday - Thursday. I know how to create the directory and put Friday's files into it, but if there are Monday files I don't know how to tell it to put files into the Friday directory.

Example:
Directory created Friday 4/4/2003. All files created from 4/4/2003-4/10/2003 are put into the 4/4/2003. Then a new directory is created on 4/11/2003, and the next week's files are put in there.

I have been playing around with the FirstDayofWeek in Now Function, and am wondering how i set the firstdayofweek to Friday. Please help.
 
Hi,

What if you simply say:

If (Day(Now) = vbFriday) Then ...

To set the first day of the week when formatting a date, do something like:

D$ = Format$(Now, "DDDD", vbFriday)

However this is only of much use if you're after the Week number or something - just setting the first day of the week to Friday and then working with single dates doesn't really do anything.

- Andy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top