Extract julian date file extension to determine what directory to copy file to

joe789

Registered User.
Local time
Today, 18:04
Joined
Mar 22, 2001
Messages
154
Hi Folks,

I am attempting to automate a manual process for a non-profit agency. Submissions come in as text files with a 5 digit extension being the julian date of the week of submission. For example, a file might be named ah7740932.01506 where the extension 01506 would indicate the julian date: the 015th day of year 2006. I am trying to in a batch program, using xcopy, or in a program design a way where I could extract that extension to point to the appropriate folder to then copy that file into. For example that file would now be copied into a folder named 01506. I automated the easier things in the project but I just have no idea how to do this part. I used xcopy to automate the additional tasks. If anyone can help me or point me in the right direction I would greatly appreciate it. In short, if I could just extract the filename extension and store in a variable to be used to copy the file in question to under a directory named the same as the filename extension I would be good.

Thank you,

Joe
 
Convert the date to a long integer, then a string, eg,

cstr(clng(YourDateReference))
 

Users who are viewing this thread

Back
Top Bottom