Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Batch File Problem in W7

    I'm using a batch file to copy files from a CD to a folder.
    This command works: copy *.doc foldername
    But this command doesn't: copy *.docx foldername
    I even tried copy *.* and *.doc?, but nothing works.
    in other words, it seems that the batch processor doesn't recognize the newer word formats. Is there some work-around? Maybe I need to use a different batch processor.

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts

    Works for Me

    Chuck,

    I tried this from both the command line and a .cmd file and had no problem {see below}. Is it possible your problem is that your files are not in the current directory, i.e. the one that is active as the batch file is running since you are not specifying the source directory it defaults to the currently active directory..

    Note the docxcopy.cmd file contains the same command as on the previous line, i.e., the source does not specify the drive\directory and it was run from the directory shown on the command line which also contains the .docx file that was copied.
    Attached Images Attached Images
    Last edited by RetiredGeek; 2011-04-30 at 14:18.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks. You nailed the problem. I had the wrong directory called out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •