Page 1 of 1 1
Topic Options
#208298 - 2014-01-13 11:58 AM Change directory with wildcard
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Hello everybody,

I'm facing a basic script problem to change directory in a script.

What I wanna do is to locate in the user's profile Mozilla directory, knowing that the user's profile name is a random directory like gkdjflkj.default
I tried the following but it doesn't work, the script is located in "%APPDATA%\Mozilla\Firefox\Profiles but not in "%APPDATA%\Mozilla\Firefox\Profiles\UserName.default

 Code:
cd "%APPDATA%\Mozilla\Firefox\Profiles" 
cd "*.default"
SHELL "%COMSPEC% /c DIR" 


Thanks for the answer.


Edited by yellowdog (2014-01-13 01:44 PM)

Top
#208299 - 2014-01-13 02:58 PM Re: Change directory with wildcard [Re: yellowdog]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA

 Code:
for each $folder in dirplus("%appdata%\Mozilla\Firefox\Profiles\","/ad")
  if right($folder,8)=".default"
    ;do stuff
  endif
next


You will need dirplus to make this work

DirPlus -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=82153

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1

Top
#208311 - 2014-01-14 10:14 AM Re: Change directory with wildcard [Re: Allen]
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Thanks a lot Allen it's working like a charm ;\)
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1172 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.058 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org