Jump to content

read dir from text


Recommended Posts

I'm trying to make this batch work for me

dir /b /ad-h "%HOMEDrive%%HOMEPATH%\..\" >all.txt

for /f "tokens=* delims=" %%F in (all.txt) do FOR /f %%i IN ('dir /b /a-d "%HOMEDrive%%HOMEPATH%\..\%%F\My Documents\My RoboForm Data\Default Profile\"') DO 7za a "roboform_data_for_%%F" "%HOMEDrive%%HOMEPATH%\..\%%F\My Documents\My RoboForm Data\Default Profile\%%i"

(later in the batch I turn the 7za's to silent exe's install for each user found..)

I only seem to get the current user to work with this cannot get other users like for instance the administrator's one

the dir is in order meaning i got same structure & files at both paths

why wont it read the administrators files in path or for other users in case or "all users"

BTW couldn't get all.txt to read "Default User" as its hidden perhaps

thanks

Edited by sweept
Link to comment
Share on other sites


I'm trying to make this batch work for me

dir /b /ad-h <snip />

BTW couldn't get all.txt to read "Default User" as its hidden perhaps

If you exclude -hidden directories then it will not see the hidden Default User directory.

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
  • Recently Browsing   0 members

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