
selecting/creating dir via user input ?
If you can assume the user has Active Desktop, then go to
Win32 Scripting [Clarence Washington]
http://cwashington.netreach.net
http://cwashington.netreach.net/script_repository/repository.asp
and search for: BrowseForFolder
===> http://cwashington.netreach.net/script_repository/query.asp
http://cwashington.netreach.net/main_site/downloads
http://cwashington.netreach.net/script_repository/faqs.asp?topic=wmifaq
http://cwashington.netreach.net/script_repository/faqs.asp?topic=adsifaq
--
Michael Harris
MVP Scripting
I'm new at all this scripting stuff, but I routinely need to
sort a bunch of files into directories based on the first few
chars in their name. I've got most of the basic idea sorted and
think with a bit (lot) of debugging I can make it work but what
I really need now is a way to select which folder/s the script
will sort.
Is there a way I can make a directory list popup for the user to
select a directory for sorting? (something like the "add
directory to playlist" dialog box that winamp uses)
need to select sort_dir from existing folders, but dupe_dir may
not exist, so must give user option to create it if possible.
file://sample code... somewhat primitive
Function ShowFolderList(sort_dir)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(sort_dir)
Set fc = f.Files
For Each f1 in fc
set ref_num = left(f1, 5)
if (fso.FolderExists(ref_num)) then
if (fso.FileExists(ref_num\f1)) then
fso.MoveFile(f1, ref_num)
else
fso.MoveFile(f1, dupes_dir)
endif
else
fso.CreateFolder(ref_num)
fso.MoveFile(f1, ref_num)
endif
else
Next
End Function
-----
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com