Shiro Posted September 6, 2009 Share Posted September 6, 2009 hi there, i want to copy some files from a directory to another but problem is that i don't know the path after some spesific location. file are here: d:\Documents\files\<?>\new\Pepsi.doc d:\Documents\files\<?>\new\beverages_details.doc d:\Documents\files\<?>\new\coke.doc d:\Documents\files\<?>\new\statics.doc but because we change <?> to some other name everyday, i am not able to copy files because of this how can i copy files from this location to another when i don't know folder name of <?> ? Link to comment Share on other sites More sharing options...
BugFix Posted September 6, 2009 Share Posted September 6, 2009 Have i understand right: <?> is a name of (only) one folder, which changes the name everyday? In this case you can get all related pathes with this pattern: "(?i)d:\\Documents\\files\\[^\\]+\\new\\\w+\.doc" Best Regards BugFix Link to comment Share on other sites More sharing options...
Shiro Posted September 6, 2009 Author Share Posted September 6, 2009 sorry, i could not understand it right way. <?> is the folder name that's right but i could not understand how 'll i use that piece of code. there is only one folder after files and before new folder. there is only one folder named <?> ? Link to comment Share on other sites More sharing options...
BugFix Posted September 6, 2009 Share Posted September 6, 2009 $pathes = _ 'd:\Documents\files\OnlyOneFolder\new\Pepsi.doc' & @CRLF & _ ; only one folder for <?> 'd:\Documents\files\Two\Folders\new\beverages_details.doc' & @CRLF & _ ; two folders for <?> !! 'd:\Documents\files\One\new\coke.doc' & @CRLF & _ ; only one folder for <?> 'd:\Documents\files\One\new\statics.doc' ; only one folder for <?> $ret = StringRegExp($pathes, '(?i)d:\\Documents\\files\\[^\\]+\\new\\\w+\.doc', 3) _ArrayDisplay($ret) Best Regards BugFix 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