Link to home
Start Free TrialLog in
Avatar of kasperEH
kasperEHFlag for Denmark

asked on

Wildcard not working in DOS move command

I am working on a migration project with a large number of files that are divided by year. The file name includes the year it was created, but when I want to move them based on this it doesn't work:
D:\BiMMigration\2005>move 2007* "d:\BiMMigration\2005\2007temp"
D:\BiMMigration\2005\2005_DOMP-AHXKQM.doc
D:\BiMMigration\2005\2005_DOMP-AHXFB5.doc

In this case, files that are starting with 2005 are move even though I write 2007*

What could be the problem?
Avatar of Bill Prew
Bill Prew

That doesn't seem right, something else happening.  If you do the following in that folder what does it display?

DIR 2007*

Also, what does the following display?

WHERE MOVE

~bp
Avatar of kasperEH

ASKER

The same, it includes the 2005 files.
ASKER CERTIFIED SOLUTION
Avatar of tcengiz
tcengiz
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please do the following and cut and paste the results and post here.

CD
DIR /B /S 2005*

Open in new window

~bp
Thank you, tcengiz. I have checked now and it is because of the 8.3 filenames. I will try to use the fsutil options in the article, to overcome this problem.

Bill Prew, thank you for your input, but this command still displays the wrong files because of the 8.3 filename problem.