Find Jobs
Hire Freelancers

Poll Win Directory and rename file based on file contents

$30-250 USD

In Progress
Posted about 12 years ago

$30-250 USD

Paid on delivery
Overview: Files from 2 different sources are written to a Windows directory. All are ASCII text files of variable file size. Each source provides a unique naming convention of its own files. Although each source may have a standard file nomenclature, the contents of each source’s files will vary and be of 3 or 4 different content patterns. Required: Poll the directory and when a new file is found matching a predetermined format, manipulate the content of the file, write it to a new directory with a new file name based on the content of the file, and delete the original file to the Recycle Bin. File Specifications: Source 1 files can be identified as they always have a 3 digit file extension, eg: APPLE.001 Banana4.089 0215.776 1. Source 1, Content Pattern 1 (“PNR”) 1.1 Identified by any 6 characters on a row by themselves on either line 1, line 2 or line 3. 1.2 Retain these 6 characters (referred to as “PNR”) 1.3 On the next row after “PNR” identified above, will be a space followed by a single digit, then a full stop, then another single digit, then a string of letters of variable length, then the character “/”. Retain all of the letters and convert to title case (referred to as “NAME”). 1.4 If both of the above are found, copy the file to a new directory as: S“PNR” space “NAME”.pnr where “S” is a constant and the file extension “.pnr” is constant, eg: SASDF3Y [login to view URL] 1.5 If the new file is successfully created, move the original file to the Recycle Bin. If the new file name already exists in the new directory, or some other processing error occurs, don’t copy it but just append “.txt” to the original file name eg: [login to view URL] [login to view URL] [login to view URL] 2. Source 1, Content Pattern 2 (“RST”) 2.1 Identified by: - line 2 being the constant “ERST” followed by 5 x “!” followed by “**PRINTOUT**” followed by 14 spaces, and - line 16 or greater, the following pattern is found: 9 spaces, 3 digits, 1 space, 10 digits, 1 space, 1 digit, 1 space. 2.2 If both of the above are found, this file type is referred to as “RST”. Process the file as follows: 2.3 For use in naming the new copy of the file, take the first 53 characters on line 4; there will always be one “/” character in that string somewhere – replace it with a single space; replace any instances of multiple concurrent spaces with a single space, and strip all trailing spaces. 2.4 copy the file to a new directory with the file name composed as follows: 3 digits, 1 space, 10 digits found in para 2.1 above, followed by a space, followed by the result of para 2.3 above, followed by the constant extension “.rst” eg: “123 1234567890 AAASDF QWER ASDFASD [login to view URL]” 2.5 If the new file is successfully created, delete the original file. If the new file name already exists in the new directory or some other processing error occurs, don’t copy it but just append “.rst” to the original file name eg: [login to view URL] [login to view URL] [login to view URL] 3. Source 1, Content Pattern 3 (“PIR”) 3.1 Identified by: - Line 1 being 23 spaces followed by the constant “ITINERARY” then new line character, plus - Line 2 is a single space followed by a new line character. 3.2 If both of the above are found, this file type is referred to as “PIR”. 3.3 For use in naming the new copy of the file: starting at the 8th character on line 3, take the string to the end of that line; there will always be one “/” character in the string somewhere – replace it with a single space; replace any instances of multiple concurrent spaces with a single space, and strip all trailing spaces (referred to as “NAME”) Process the file as follows: 3.4 if the last character on line 4 is “-”, delete it. 3.5 delete the last 3 characters of the file. 3.6 copy the file to a new directory with the file name composed as follows: - take the string on line 4 starting at position 52 to the end of the line. If the last character is “-” delete it, - followed by a space, - followed by “NAME” determined in 3.4 above. - give it the extension “.pir”, eg: 123 1234567890 AAASDF QWER ASDFASD [login to view URL] 3.7 If the new file is successfully created, move the original file to the Recycle Bin. If the new file name already exists in the new directory or some other processing error occurs, don’t copy it but just append “.pir” to the original file name eg: APPLE.001. pir Banana4.089. pir 0215.776. pir Source 2 files can be identified as they always have the constant extension, eg: APPLE.1G Banana4.1G 0215.1G 4. Source 2, Content Pattern 1 (“ITN1G”) 4.1 Identified by: - the first 17 lines are blank, plus - one space then the string “ITINERARY/” is found on line 18. 4.2 If both of the above are found, this file type is referred to as “ITN1G”. 4.3 For use in naming the new copy of the file: starting at the 7th character on line 21, take the string to the end of that line; there will always be one “/” character in the string somewhere – replace it with a single space; replace any instances of multiple concurrent spaces with a single space, and strip all trailing spaces (referred to as “NAME”) Process the file as follows: 4.4 delete the last 3 characters of the file. 4.5 copy the file to a new directory with the file name composed as follows: - take the string on line 23 starting at position 12 to the second space. - followed by a space, - followed by “NAME” determined in 3.4 above. - give it the extension “.itn1g”, eg: 123 1234567890-123 AAASDF ASDFASD [login to view URL] 4.6 If the new file is successfully created, move the original file to the Recycle Bin. If the new file name already exists in the new directory or some other processing error occurs, don’t copy it but just append “.itn1g” to the original file name eg: [login to view URL] [login to view URL] [login to view URL] Other Source 2 file specifications and a possible Source 3 file specifications will be advised later in a separate project when these details are known. Other Considerations: 1. It doesn’t matter what technology is used to process the files provided the process is fast and not CPU intensive. 2. Whether it’s by means of an ini file or an XML template or any other methodology, all variables need to be user-configurable, eg: - how often to poll the directory - what the original search directory is - what the new file directory is per file type - what the search parameters of each file type are - what the new file extensions are etc 3. The solution does not need an installation program, just clear documentation as to how to install, configure & use it. If the solution is a compiled program, the source code as well as the compiled program need to be supplied. 4. Please suggest any particular problems or omissions identified with the above rationale, or any suggestions as to better processing 5. I will provide test data to the successful bidder. Any questions, please ask.
Project ID: 1441952

About the project

12 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I think I can help with this project, as you will see if you read my message
$100 USD in 4 days
5.0 (2 reviews)
3.7
3.7
User Avatar
hi, i would be very glad to help you with this.
$140 USD in 5 days
0.0 (1 review)
0.0
0.0
12 freelancers are bidding on average $166 USD for this job
User Avatar
Hello! I'm senior Java developer with 8 year of experience. I could help you with developing such application.
$200 USD in 5 days
5.0 (8 reviews)
4.9
4.9
User Avatar
It is simple and well described project. All requirements will be satisfied as required. Please see my private message for more details.
$100 USD in 3 days
5.0 (10 reviews)
4.6
4.6
User Avatar
I am very proficient in Java and C++/Windows API. Please view my profile for feedback on past projects.
$100 USD in 5 days
5.0 (7 reviews)
4.1
4.1
User Avatar
Hi I can do this project with quality
$200 USD in 4 days
5.0 (3 reviews)
4.0
4.0
User Avatar
Ready to start work. Kindly check your PMB.
$250 USD in 3 days
4.4 (7 reviews)
4.0
4.0
User Avatar
Check PMB please.
$250 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Can write it both on Python or C++.
$150 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Good afternoon. I have 8+ years programming Access professionally in the finance industry. My profile describes my experience. I could whip this up in VBA quite quickly. I'd be happy to talk further. Regards, Derek.
$200 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, We are a group of well experienced software team. This task can be done within our team as per your requirements. Thank you.
$100 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello. Experienced java programmer here. I can do this job.
$200 USD in 15 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Mosman, Australia
4.9
7
Member since Dec 20, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.