MSFN Forum: read dir from text - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

read dir from text batch Rate Topic: -----

#1 User is offline   sweept 

  • Junior
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 08-November 05

Posted 02 February 2012 - 01:02 PM

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

This post has been edited by sweept: 02 February 2012 - 01:38 PM



#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 02 February 2012 - 02:52 PM

View Postsweept, on 02 February 2012 - 01:02 PM, said:

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy