Non-techie here, learning as I go.
1) My files are in C:/Receipts/
2) Each file is numbered 1-31
I need ms to go into the folder, select the numbered file according to todays date and upload it to my main backup. Can anyone show me what that would look like? Please and Thank you
Selecting File # According to Day of month
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 15
- Joined: Sun Jul 23, 2023 4:57 pm
-
- Newbie
- Posts: 15
- Joined: Sun Jul 23, 2023 4:57 pm
Re: Selecting File # According to Day of month
I tried this, but Its not working
//Get the date
GetDate>TheDate
//Separate out all the parts
Separate>TheDate,/,DateParts
//Get the mm,dd, and yyyy
Let>dd=DateParts_1
Let>DateString=%dd%
//Set the path to your file
Let>FilePath=C:\receipts\%DateString%.jpg
* Yes! Im in over my head. My brain is not wrapping around this
//Get the date
GetDate>TheDate
//Separate out all the parts
Separate>TheDate,/,DateParts
//Get the mm,dd, and yyyy
Let>dd=DateParts_1
Let>DateString=%dd%
//Set the path to your file
Let>FilePath=C:\receipts\%DateString%.jpg
* Yes! Im in over my head. My brain is not wrapping around this
- Dorian (MJT support)
- Automation Wizard
- Posts: 1414
- Joined: Sun Nov 03, 2002 3:19 am
Re: Selecting File # According to Day of month
Apologies for the slow reply - this one slipped through the net.
Depending on your time format, that might return the month. If your system is using the USA date format it returns C:\receipts\11.jpg
UK format returns C:\receipts\27.jpg
If this is what's happening there are a couple of ways of fixing it :
1: Either use Let>dd=DateParts_2 instead of Let>dd=DateParts_1
2: Use Day instead of GetDate :
However, the second method will return 01,02,03 etc for the single digit dates. If you require it to be 1,2,3, etc you can use Format :
Depending on your time format, that might return the month. If your system is using the USA date format it returns C:\receipts\11.jpg
UK format returns C:\receipts\27.jpg
If this is what's happening there are a couple of ways of fixing it :
1: Either use Let>dd=DateParts_2 instead of Let>dd=DateParts_1
2: Use Day instead of GetDate :
Code: Select all
//Get the date
Day>DateString
//Set the path to your file
Let>FilePath=C:\receipts\%DateString%.jpg
Code: Select all
//Get the date
Day>DateString
//Format single digit dates
If>DateString<10
Format>%.1d,DateString,DateString
Endif
//Set the path to your file
Let>FilePath=C:\receipts\%DateString%.jpg