+ Reply to Thread
Results 1 to 4 of 4

Batch to Copy with wildcard in file name

  1. #1
    Registered User
    Join Date
    02-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    21

    Batch to Copy with wildcard in file name

    I have this batch file to copy and rename a file on a public directory to another public directory. The file is normally about 1600kb in size but copied only has 1kb. If I change the wildcard in the name to the real name I get the whole file copied. Problem is the file name changes after every update e.g. Name 3.25.13, Name 4.12.13 e.t.c so I have to use a wildcard unless there is any other way you can tell me, which will be very much appreciated. Here is the code for the batch:

    c:
    cd U:\Sourcing\Vendor Demand Planning\Master CPFR\

    copy "U:\Sourcing\Vendor Demand Planning\Master CPFR\Master CPFR "*".xlsx" "U:\Sourcing\Vendor Demand Planning\Pricing Project\Master CPFR.xlsx"


    Any help will be appreciated.

  2. #2
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Batch to Copy with wildcard in file name

    http://www.computerhope.com/jargon/w/wildcard.htm & http://www.computerhope.com/issues/ch000766.htm will show you whats wrong with your file naming (to much use of "" )

  3. #3
    Registered User
    Join Date
    02-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Batch to Copy with wildcard in file name

    I have already tried Master CPFR*.xlsx and same things still happens.

  4. #4
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Batch to Copy with wildcard in file name

    Put this in your BAT file
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1