Find Jobs
Hire Freelancers

CREATE A BASH SCRIPT TO RENAME FILES

$10-30 USD

Completed
Posted over 6 years ago

$10-30 USD

Paid on delivery
Hello, I have several XML files with a filename that I want to change in order to have an easier way to locate the file i need for future references, I use Mac Os The actual filenames are almost a "random name". The new filename should look like the follow structure, see example bellow: [login to view URL] [login to view URL] [login to view URL] Where: a) "IMS421231I45" is the Vat ID that is actually in a specific field inside the file: " <emisor rfc="IMS421231I45">" b) "AUCJ710419SI6" is the Vat ID that is actually in a specific field inside the file: " <cfdi:Receptor rfc="AUCJ710419SI6">" c) "20170102" is the year, month and day YYYYMMDD inside the "fecha" field: <cfdi:Comprobante xmlns:cfdi="[login to view URL]" xmlns:tfd="[login to view URL]" xmlns:xsi="[login to view URL]" version="3.2" fecha="2016-07-27T12:04:50" sello="AZCqZuTbgKeBkf/3fXc1pVINRqPy73ULAC2SawmzcyfV9OgwsPoPpwH943nhC92xn7y/7FRbQ63qpk/8vRoGsR7nSW1txyslPiLnC3Gdi5fIUEojyRrZINQc1zB2RITLsEX9NIuAj1TnvCX48koOUCh+97ppzBiv1WT7nnKoGQs=" formaDePago="PAGO EN UNA SOLA EXHIBICION" noCertificado="00001000000304541622" certificado="MIIErDCCA6H" subTotal="4540.48" total="4540.48" tipoDeComprobante="ingreso" metodoDePago="Desconocido" LugarExpedicion="MEXICO" xsi:schemaLocation="[login to view URL] [login to view URL]"> d) The last tree digits is a secuence number, just in case the same "emisor" has issued to "receptor" more than one time in that specific date. I need a bash script to in a specific folder locate each field and rename the files according this criteria. I will run this script on a monthly basis. here you have 3 example files Hope someone can help me Regards Jorge
Project ID: 15486766

About the project

2 proposals
Remote project
Active 6 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 can create simple MacOS executable (not a Bash script) that will processl all XML files in a folder, parse each file (extract emisor, cfdi:Receptor, fecha etc) and rename the file. Relevant Skills and Experience I have worked on similar projects many times before (parsing XML and renaming the files) that's why I'm sure you'll be impressed with my work. Proposed Milestones $35 USD - MacOS script to rename files
$35 USD in 1 day
5.0 (13 reviews)
4.0
4.0
2 freelancers are bidding on average $106 USD for this job
User Avatar
Hi, How are you? I've carefully read your description and I am very interested in your project. I can complete your project within a day. Relevant Skills and Experience I have 5+ years of experience in the application for Mac OS X. I want to discuss with you about your project in more detail. Proposed Milestones $176 USD - init
$176 USD in 1 day
5.0 (19 reviews)
4.8
4.8

About the client

Flag of MEXICO
Mexico, Mexico
5.0
3
Payment method verified
Member since Mar 8, 2013

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.