Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9165645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:57:17+00:00 2026-06-17T14:57:17+00:00

Here is my situation. I have a server which is saving file everyday in

  • 0

Here is my situation.

I have a server which is saving file everyday in the following format:
TACO_2012-Dec-30__21-50-00_UTC.csv

I want to rename this file to following format using bat script:
TACO_20121230_215000.csv
TACO_yyyymmdd_hhmmss.csv

Here is what I want to do as a script
1. Login to ftp server
2. rename file to the new format as above

Please help…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:57:18+00:00Added an answer on June 17, 2026 at 2:57 pm
    @echo off
    setlocal
    for /f "tokens=2-7 delims=_.-" %%A in ('dir /B TACO_*') do (
      setlocal enabledelayedexpansion
      call :getmonth %%B
      ren TACO*_*%%A-%%B-%%C*_*%%D-%%E-%%F_UTC.csv TACO_%%A!mon!%%C_%%D%%E%%F.csv
      endlocal
    )
    
    
    :getmonth
    if "%1" equ "Jan" set mon=01
    if "%1" equ "Feb" set mon=02
    if "%1" equ "Mar" set mon=03
    if "%1" equ "Apr" set mon=04
    if "%1" equ "May" set mon=05
    if "%1" equ "Jun" set mon=06
    if "%1" equ "Jul" set mon=07
    if "%1" equ "Aug" set mon=08
    if "%1" equ "Sep" set mon=09
    if "%1" equ "Oct" set mon=10
    if "%1" equ "Nov" set mon=11
    if "%1" equ "Dec" set mon=12
    goto :eof
    endlocal
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the situation. I have both an SMTP server which accepts only authentication.
I have a situation here. I have a redundant TCP server setup which takes
Here's the situation I have a webpage which has one drop down called prefer.
So here is the situation. I have a database on a remote server that
SQL Server 2008: I've got a situation here in which I wish to read
Here’s my situation: I have a free app which I plan to provide access
Here's the situation: I have an InstallShield LE setup project (a couple actually) which
I have a situation here: I have a page which is using to show
So here's the situation: I have a recursive, asynchronous AJAX call which is pulling
Here is the situation.... I have a iframe, which is located to my client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.