View Full Version : Zip.AddFolder
Hello.
Zip.Add does not add Folders.
What I'm suggesting is 2 separate functions instead of just one,
Zip.AddFile
Zip.AddFolder
Thanks,
Mina
RizlaUK
02-01-2008, 03:19 PM
Yes, i also think you should bring all the other objects functions in line with the sideshow object (SlideShow.FillFromFolder)
ListBox.FillFromFolder
Combo.FillFromFolder
both adding the filename as text and path as data
FoxLeader
02-01-2008, 03:43 PM
I agree with both of you :yes
+1
Yes, i also think you should bring all the other objects functions in line with the sideshow object (SlideShow.FillFromFolder)
ListBox.FillFromFolder
Combo.FillFromFolder
both adding the filename as text and path as data
Hi Rizla.
This would be a nice addition. However, you can accomplish this for now using functions. (Didn't test, but should work out fine)
function ListBox.FillFromFolder(LB_Name, fPATH)
fi_PATHS = File.Find(fPATH, "*.*", false, false, nil, nil);
if fi_PATHS == nil then
Application.ExitScript();
end
for j, fi_PATH in fi_PATHS do
fi_PART = String.SplitPath(fi_PATH);
ListBox.AddItem(LB_Name, fi_PART.Filename, fi_PATH);
end
end
function Combo.FillFromFolder(CB_Name, fPATH)
fi_PATHS = File.Find(fPATH, "*.*", false, false, nil, nil);
if fi_PATHS == nil then
Application.ExitScript();
end
for j, fi_PATH in fi_PATHS do
ComboBox.AddItem(CB_Name, fi_PART.Filename, fi_PATH);
end
end
-- Call Like This
ListBox.FillFromFolder("ListBox1", "AutoPlay\\MyFolder")
Combo.FillFromFolder("ComboBox1", "AutoPlay\\MyFolder")
RizlaUK
02-02-2008, 02:22 PM
Thanks Mina, but i already have a set of listbox and combo functions i use quite regular and i just thought these ones would be of use to nearly every-body who uses AMS.
Also, ListBox.FilesToZip() would be another nice function to have to go with ListBox.FillFromFolder(), and SlideShow.FilesToZip().....and....lol the list is endless
i might go write a mega lua plugin with all the *missing* functions :lol
Darryl
02-04-2008, 12:05 PM
Hi Guys,
I had a couple questions regarding your requests.
1) As far as the Zip.AddFolder suggestion, could you explain a little further how what you're describing differs from the current functionality in the Zip.Add action given the use of wildcards and the "IncludeFolderNames" parameter?
2) The suggestions regarding the ListBox and ComboBox folder actions, what were you guys looking for. The slideshow is a little different in that you are always working with files. What were you guys thinking for the functionality of the action in the ListBox and ComboBox. Something like the "Text" being the filenames, and the "Data" being the full paths to the files?
RizlaUK
02-19-2008, 09:06 PM
As far as the Zip.AddFolder suggestion, could you explain a little further how what you're describing differs from the current functionality in the Zip.Add action
getting the actual folder structure in the zip can be quite tricky for the novice user, i know it took me a while, a "AddFolder" function could maybe wrap the "AddFile" function and make it a little easer to just zip a folder
Something like the "Text" being the filenames, and the "Data" being the full paths to the files?
exactly what i was thinking, i know its very much a targeted function but proberly a very widely used targeted function, im sure everyone at some point will use a listbox for files/folders
edit, while on the subject of zip files, how about SFX support ??, i get errors if i try to add files to a SFX exe
Darryl
02-20-2008, 07:49 AM
Thanks for the suggestions.
FillFromFolder - REF: 17273
Zip action - REF: 17272
SFX support - REF: 17274
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.