Jump to content

RegEx help


Shiro
 Share

Recommended Posts

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

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

$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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...