Jump to content
UBot Underground

How to get files from folder in variable.


Recommended Posts

Hello I've just noticed that "get files" command isn't listed in Standard version so i've noticed a workaround.Dont know if its already posted but I've just tested it and its working like a charm.

Create a batch file with the following line:

 

"dir /s /b  __folderhere__"   Be careful with the spaces!

 

For example i'm using it to get filenames+directory of pictures I downloaded from pinterest:

 

"dir /s /b  c:\users\__username__\desktop\pinterest"

 

The above line gets results like the following:

 

c:\users\__username__\desktop\pinterest\0653abdf6013c822a97187c612f2a518.jpg
c:\users\__username__\desktop\pinterest\0ed795476a4df6df2aa11f7acd77034a.jpg
c:\users\__username__\desktop\pinterest\142dff6563856a954fd9f0db7d10655d.jpg
 
The next step is to execute the batch and get the results in a variable. Im using UbotDev's plugin which is super cool and its free.
 
set(#shell, $plugin function("Advanced Shell.dll", "$shell batch hidden", "{$special folder("Desktop")}/batch.bat"), "Global")  My batch file is named "batch.bat" and its located on the desktop.
 
Thats it!
 
Note: if you are using Windows XP you should replace the batch file so it looks like this:
 
 
"dir /s /b  c:\Documents and Settings\__username__\desktop\pinterest" thats if you want to use a folder located on your desktop.
 
Note2: In the attachment you can see a slight problem which is the first line containing the command, but this can be fixed easly.
 
UbotDev's super cool plugin:
 
Have fun.

post-10549-0-03231600-1383393822_thumb.jpg

Link to post
Share on other sites
  • 5 years later...

 

Hello I've just noticed that "get files" command isn't listed in Standard version so i've noticed a workaround.Dont know if its already posted but I've just tested it and its working like a charm.

Create a batch file with the following line:

 

"dir /s /b  __folderhere__"   Be careful with the spaces!

 

For example i'm using it to get filenames+directory of pictures I downloaded from pinterest:

 

"dir /s /b  c:\users\__username__\desktop\pinterest"

 

The above line gets results like the following:

 

c:\users\__username__\desktop\pinterest\0653abdf6013c822a97187c612f2a518.jpg
c:\users\__username__\desktop\pinterest\0ed795476a4df6df2aa11f7acd77034a.jpg
c:\users\__username__\desktop\pinterest\142dff6563856a954fd9f0db7d10655d.jpg
 
The next step is to execute the batch and get the results in a variable. Im using UbotDev's plugin which is super cool and its free.
 
set(#shell, $plugin function("Advanced Shell.dll", "$shell batch hidden", "{$special folder("Desktop")}/batch.bat"), "Global")  My batch file is named "batch.bat" and its located on the desktop.
 
Thats it!
 
Note: if you are using Windows XP you should replace the batch file so it looks like this:
 
 
"dir /s /b  c:\Documents and Settings\__username__\desktop\pinterest" thats if you want to use a folder located on your desktop.
 
Note2: In the attachment you can see a slight problem which is the first line containing the command, but this can be fixed easly.
 
UbotDev's super cool plugin:
 
Have fun.

 

Hi, any chance you could send me the plugin mentioned as the developers site is down :)???

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...