stg68 Posted April 30, 2008 Share Posted April 30, 2008 I would like to copy all files from one directory to another where file name starts with number (0-9). Your help will be appreciated. Regards Link to comment Share on other sites More sharing options...
DaRam Posted April 30, 2008 Share Posted April 30, 2008 I would like to copy all files from one directory to another where file name starts with number (0-9). Your help will be appreciated. Regards For $i = 0 to 9 If FileExists("C:\" & $i & "*.*") Then FileCopy("C:\" & $i & "*.*", "D:\mydir\*.*") EndIf Next Replace C:\ with source Drive and Path, D:\mydir\ with Target Drive and Path. Link to comment Share on other sites More sharing options...
stg68 Posted April 30, 2008 Author Share Posted April 30, 2008 For $i = 0 to 9 If FileExists("C:\" & $i & "*.*") Then FileCopy("C:\" & $i & "*.*", "D:\mydir\*.*") EndIf Next Replace C:\ with source Drive and Path, D:\mydir\ with Target Drive and Path. Cool! Thank you a lot! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now