Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

273
Vistas
Simple renaming - remove (JOB_0000_) from file name

I work with software that generates an output files with the names: JOB_1_sample-file_20220211083122.txt in a specific folder. There are thousands of files at the same time.

The beginning of the text file is variable (JOB_1,JOB_2,JOB_3,etc).

Example: JOB_2_sample-file_20220211083122.txt, JOB_34_sample-file_20220211083122.txt, JOB_1007_sample-file_20220211083122.txt.

I need to remove the initials from the files, leaving only the 'sample' forward. Preferably using Powershell, CMD or javascript.

Is there such a possibility?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use Rename-Item with a delay-bind script block, combined with a -replace operation that uses a regex to remove the prefix of interest:

$dir = '.' # specify target dir.
Get-ChildItem -LiteralPath $dir -Filter *.txt |
  Rename-Item -NewName { $_.Name -replace '^JOB_\d+_' } -WhatIf

Note: The -WhatIf common parameter in the command above previews the operation. Remove -WhatIf once you're sure the operation will do what you want.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda