So I want to access this specific path
c:\users\admin\social\profile\KoJumperz\pictures
but my friends name isn't KoJumperz
so his path is not the same. His path would be
C:\users\admin\social\profile\JhonSmith\pictures
Is there a way to create a code that will open the first folder in my profile folder?
Start enumerating the folders and break the loop after the first iteration:
To get the 2nd folder skip 1 entry of dir listing:
Use
skip=2
to get the 3rd and so on.Or find an environment variable that may be set on the user's PC, for example
%socialusername%
(the exact variable name can be seen by runningset
in command prompt console):