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

  • Home
  • SEARCH
  • 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 7904213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:57:25+00:00 2026-06-03T09:57:25+00:00

As the name implies, the –no-clobber (or -n ) flag of the mv command

  • 0

As the name implies, the --no-clobber (or -n) flag of the mv command (at least the Gnu version) causes the command to fail if the requested move would have overwritten an existing file.

How can this be emulated in a Windows batch file?

(BTW, the projected batch file is intended to run automatically (i.e. unsupervised), so any solution that entails prompting a human user for permission is out.)

Thanks!

  • 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-03T09:57:26+00:00Added an answer on June 3, 2026 at 9:57 am
    > MOVE /?
    Moves files and renames files and directories.
    
    To move one or more files:
    MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
    
    To rename a directory:
    MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2
    
      [drive:][path]filename1 Specifies the location and name of the file
                              or files you want to move.
      destination             Specifies the new location of the file. Destination
                              can consist of a drive letter and colon, a
                              directory name, or a combination. If you are moving
                              only one file, you can also include a filename if
                              you want to rename the file when you move it.
      [drive:][path]dirname1  Specifies the directory you want to rename.
      dirname2                Specifies the new name of the directory.
    
      /Y                      Suppresses prompting to confirm you want to
                              overwrite an existing destination file.
      /-Y                     Causes prompting to confirm you want to overwrite
                              an existing destination file.
    
    The switch /Y may be present in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.  Default is
    to prompt on overwrites unless MOVE command is being executed from
    within a batch script.
    
    > ECHO N | MOVE /-Y OLDFILE NEWFILE
    

    Alternatively:

    IF NOT EXIST NEWFILE MOVE OLDFILE NEWFILE
    

    Combined with a FOR loop for multiple files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a ruby script Daemon that, as it's name implies, runs as
Must iOS apps have a globally unique name? The iTunes Connect Developer Guide implies
The name says it all, but to elaborate I have a list of vectors
There is a procedure GetFileList - returns, as the name implies, a list of
If it's a scripting language as the name implies it must be written in
I have a database table which contanis a field name Province bits and it
etherheader points to the header of ether packet as its name implies: printf(Source MAC
I'm writing a small assembly routine called isOdd, which, as the name implies, returns
Name: <%= Html.TextBox(txtName, 20, new { @class = hello }) %> I want that
id name mydate 1 co 2011-02-10 07:25:02 2 Carl 2011-02-10 07:26:02 . . .

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.