External variables

how can external (windows) variables like USERNAME be integrated or used in an internal function like "regexpr"?

I want to move some files into certain directories.

I just used the search function and found this thread:

Thank U ohrenkino.
This thread helps me a lot. :wink: