Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How do I copy only changed files  (Read 20176 times)

0 Members and 1 Guest are viewing this topic.

foxidrive



    Specialist
  • Thanked: 268
  • Experience: Experienced
  • OS: Windows 8
Re: How do I copy only changed files
« Reply #15 on: August 04, 2016, 10:59:38 PM »
I despise made up acronyms...

Me too!  HGSF!  ;)

geoffl

    Topic Starter


    Intermediate

    • Experience: Beginner
    • OS: Unknown
    Re: How do I copy only changed files
    « Reply #16 on: August 04, 2016, 11:18:53 PM »
    I am  guessing that copy works undex DOS but not Xcopy.

    foxidrive



      Specialist
    • Thanked: 268
    • Experience: Experienced
    • OS: Windows 8
    Re: How do I copy only changed files
    « Reply #17 on: August 04, 2016, 11:51:29 PM »
    I am  guessing that copy works undex DOS but not Xcopy.

    We are all guessing what you are doing what you are doing it with.

    geoffl

      Topic Starter


      Intermediate

      • Experience: Beginner
      • OS: Unknown
      Re: How do I copy only changed files
      « Reply #18 on: August 05, 2016, 12:29:39 AM »
      I run old DOS software under windows using NT virtual dos machine. The batch file is run by my program which I guess means it runs under DOS. I have been using the copy command and it copies every file in the directory. When I changed copy to Xxopy I get the message - bad command of file. I am wondering Why xcopy works from the command prompt but not under virtual DOS

      foxidrive



        Specialist
      • Thanked: 268
      • Experience: Experienced
      • OS: Windows 8
      Re: How do I copy only changed files
      « Reply #19 on: August 05, 2016, 02:52:28 AM »
      I run old DOS software under windows using NT virtual dos machine. The batch file is run by my program which I guess means it runs under DOS. I have been using the copy command and it copies every file in the directory. When I changed copy to Xxopy I get the message - bad command of file. I am wondering Why xcopy works from the command prompt but not under virtual DOS

      Virtual Dos means nothing to people reading here.  We don't know what environment you are running under.
      We don't know what is in your batch file.  You've been told why that error message occurs.

      You don't understand your problem and you don't understand how poor your level of detail and information is.


      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: How do I copy only changed files
      « Reply #20 on: August 05, 2016, 06:28:48 AM »
      When you run VER what version does it show, this way we can determine the exact OS version your running?

      such as I run VER and it shows: Microsoft Windows [Version 6.1.7601]

      If you run XCOPY/? does it show help information showing that XCOPY command exists?

      From the VER output we can determine what your running for OS environment: https://en.wikipedia.org/wiki/Ver_(command)

      Spoiler



        Specialist

        Thanked: 50
      • Experience: Beginner
      • OS: Windows XP
      Re: How do I copy only changed files
      « Reply #21 on: August 05, 2016, 09:56:07 AM »
      You can try Rich Copy. I use it all the time. Works great....

      https://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog

      It is a GUI version of robocopy written by a MS engineer.

      Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: How do I copy only changed files
      « Reply #22 on: August 05, 2016, 01:03:53 PM »
      Quote
      I am running this under NTVDM Does that make a diffrernce?
      Yep, that changes things, Running the batch via command.com via the 16-bit DOS emulation provided via NTVDM means there will be no NT Command extensions available. It also means that all paths must be 8.3 paths, and there are a number of other limitations.

      If you enter the command:
      Code: [Select]
      echo %path%what is output? From the sounds of it there may be values listed that are an invalid drive under NTVDM. This message is output when command.com starts up. It looks like two entries were considered invalid drive specs. It's also possibly why you get "Bad Command or File Name" as it cannot find xcopy as a result.

      One possible workaround is to "escape" NTVDM. For example instead of having the MS-DOS program in question run your batch file- which will go into command.com- you may be able to configure it to run your batch file through cmd (cmd /c batch.bat) if you can change the command. If not, you can have the batch file it runs instead launch your main batch file via cmd. That should hopefully prevent issues as the batch will be running under the same cmd.exe environment you've already confirmed it to function correctly with.

      For others- I am fairly certain their "batch file" consists of one xcopy command. It is running under the command.com interpreter of MS-DOS which is being launched, as described by the OP, by another MS-DOS program; This all takes place under the 16-bit emulation of NTVDM for MS-DOS applications, present in all 32-bit Windows versions. The MS-DOS command interpreter considers multiple entries in the PATH variable invalid, which is why those messages appear. when it then runs the batch itself, it can't find xcopy, possible because of those path errors - and thus emits "Bad Command or Filename".

      I was trying to dereference Null Pointers before it was cool.

      foxidrive



        Specialist
      • Thanked: 268
      • Experience: Experienced
      • OS: Windows 8
      Re: How do I copy only changed files
      « Reply #23 on: August 05, 2016, 09:56:51 PM »
      For others- I am fairly certain their "batch file" consists of one xcopy command. It is running under the command.com interpreter of MS-DOS which is being launched, as described by the OP, by another MS-DOS program;

       when it then runs the batch itself, it can't find xcopy, possible because of those path errors - and thus emits "Bad Command or Filename".

      I shouldn't be quite so grumpy with the guy but the error message he posted isn't from an NT series Windows command prompt.

      command.com in modern Windows is a stub that calls CMD.exe and is only there for backward compatibility to fool older programs into thinking they are running under command.com

      If you open a prompt by typing command.com and then type a bogus command you'll get the modern error message and not "Bad command or filename".



      It seems to me that the fellow is using Dosbox or Virtualbox or some other emulator and in any case is not describing what he's doing at all.  His question about an error is like going to your dentist and saying "I have a sore tooth, guess which one it is?"

      When I changed copy to Xxopy I get the message - bad command of file.

      If you typed Xxopy in your batch script then there's your problem.

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: How do I copy only changed files
      « Reply #24 on: August 05, 2016, 10:11:47 PM »
      True enough foxidrive. I can confirm that I was incorrect, even in the specific instance where Windows XP (as you noted, no details- including OS) is used and a MS-DOS program is run and then a DOS Shell opened from the DOS program, there is no "Bad command or filename" message (and certainly not "Bad command or file" in either case.)

      One possibility could be if it is a localized version and they are translating? It might use a message like that- but again, details that ought to have been mentioned.
      I was trying to dereference Null Pointers before it was cool.

      geoffl

        Topic Starter


        Intermediate

        • Experience: Beginner
        • OS: Unknown
        Re: How do I copy only changed files
        « Reply #25 on: August 06, 2016, 04:50:05 PM »
        Thank you for your help and the considerable time you have spent. You must realize that the reason people come here is because they don't have the knowledge that you people have therefore some of the questions and answers can be a little confusing. I am a little concerned with Patio. My best guess is that he is an agro 12 year old going through puberty and has not learnt any social graces yet. Maybe some of you more intelligent guys could take him under your wing and teach him that abusive comments (most of what I see from him) drives people away from this site which, to me, has been a wonderful source of information. Thank you again.
        Geoffl

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: How do I copy only changed files
        « Reply #26 on: August 06, 2016, 05:22:20 PM »
        Well my sincere apologies for pointing out a non-existing acronym that took 14 posts to be explained...

        Hope you feel better.
        " Anyone who goes to a psychiatrist should have his head examined. "

        geoffl

          Topic Starter


          Intermediate

          • Experience: Beginner
          • OS: Unknown
          Re: How do I copy only changed files
          « Reply #27 on: August 06, 2016, 05:27:51 PM »
          I think you might be a few bricks short of a chimney!

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: How do I copy only changed files
          « Reply #28 on: August 06, 2016, 05:56:23 PM »
          If you put half the effort into providing real details that you did into composing a misdirected personal attack, this thread could actually make some forward progress.
          I was trying to dereference Null Pointers before it was cool.

          foxidrive



            Specialist
          • Thanked: 268
          • Experience: Experienced
          • OS: Windows 8
          Re: How do I copy only changed files
          « Reply #29 on: August 07, 2016, 05:30:35 AM »
          has not learnt any social graces yet.

          geoffl, you still fail to provide details about the subject at hand and yet you write things like that above.
          Look in the mirror, my friend.