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 9141859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:42:04+00:00 2026-06-17T09:42:04+00:00

I am writing a script to copy file from a ftp server to local.i

  • 0

I am writing a script to copy file from a ftp server to local.i am able to use cmd command to download file etc. My only problem now is copying file to destination.
I want copy file based on month.If the current month is odd(like jan,mar,may,july…etc) then file should copy to D:\ if the month is even(like feb,apr etc..) the file should be copied to E:\ How can i do this by using cmd command script.I think i should get current date and extract month and do it on the basis of month.But how can i do it?

  • 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-17T09:42:05+00:00Added an answer on June 17, 2026 at 9:42 am
    @echo off
    rem Next line assume that %date% format is MM/DD/YYYY:
    rem (change by tokens=2 if format is DD/MM/YYYY)
    for /F "tokens=1 delims=/" %%a in ("%date%") do set /A parity=1%%a %% 2
    if %parity% equ 1 (
       set drive=D:\
    ) else (
       set drive=E:\
    )
    copy the_file... %drive%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a bash script to copy a file from a remote server,
I want to copy a file from a remote server to a local server
So, I'm writing a chunked file transfer script that is intended to copy files--small
I'm writing a powershell script for deployment. I need to copy changed files from
im writing a script to get services from local and remote machines. I've had
I'm writing a python script to replace strings from a each text file in
I am writing a python script to copy python(say ABC.py) files from one directory
I'm writing a script to copy compiled files from one location to another. What
I'm interested in writing a script so that the only copy of the script
So I'm writing a script that reads from a config file, and I want

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.