whoami 26 Posted September 29, 2012 Report Share Posted September 29, 2012 My point is that I need to multithread, and well.. open different files that contain URLs. In this particular case it will run randomly with different accounts, different proxys and same process.So how can I grab files extensions from a folder and list them to process it? Quote Link to post Share on other sites
VaultBoss 310 Posted September 29, 2012 Report Share Posted September 29, 2012 divider comment("Check a Local Folder to Grab the File Names") add list to list(%lst_DataFolderFiles, $get files(#var_SpecificFolder, "No"), "Delete", "Global") divider ^^^ That is how I do it.(the "No" means I'm only grabbing the file names within the given folder - that is stored from ahead in the #var_SpecificFolder variable - but if you want to get the full path, use "Yes" instead) Next step is to use the newly created list to randomly get file names from it and pass each file name to your custom command/function that runs on a separate thread.At the same time, remove the used file name from the initially grabbed ones, to avoid them being selected again, until you exhaust the list. Quote Link to post Share on other sites
Legend 181 Posted September 29, 2012 Report Share Posted September 29, 2012 So you want to grab a list of files and then just use the extensions? Not sure I follow you... Quote Link to post Share on other sites
whoami 26 Posted September 30, 2012 Author Report Share Posted September 30, 2012 divider comment("Check a Local Folder to Grab the File Names") add list to list(%lst_DataFolderFiles, $get files(#var_SpecificFolder, "No"), "Delete", "Global") divider ^^^ That is how I do it.(the "No" means I'm only grabbing the file names within the given folder - that is stored from ahead in the #var_SpecificFolder variable - but if you want to get the full path, use "Yes" instead) Next step is to use the newly created list to randomly get file names from it and pass each file name to your custom command/function that runs on a separate thread.At the same time, remove the used file name from the initially grabbed ones, to avoid them being selected again, until you exhaust the list. Great!Does this works the same as if I upload constantly files to an FTP and I gather all the files list with this $get files in the URL? Quote Link to post Share on other sites
VaultBoss 310 Posted September 30, 2012 Report Share Posted September 30, 2012 Great!Does this works the same as if I upload constantly files to an FTP and I gather all the files list with this $get files in the URL?Here is what the Help File says:Get files (PRO Edition Only)Files From Folder returns a list of all files in any given directory.I would say it looks like ONLY working with local files, not server files (that you have FTP'd) Also, the example code from the Help File suggests the same On the other hand... normally, the files on a directory on a server SHOULD be protected from being viewed by everybody, at least with an index file on that folder, if not .htaccessI think it is dangerous to have open directories on web servers - just sayin'... it's best practice to hide them. Hope this helps... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.