Jump to content
UBot Underground

Recommended Posts

How to create New Folder with chosen filename in Ubot???

 

Please advice...

 

You can shell to the command prompt to do this. The command for making a folder is 'md', calling cmd.exe with a "/c" (the /c switch closes cmd.exe when it is done with the command you send it).

 

I would attach a nice screen shot I took but apparently I have used 497k of by 500k upload quota on this forum!

 

Andy

Link to post
Share on other sites

You can shell to the command prompt to do this. The command for making a folder is 'md', calling cmd.exe with a "/c" (the /c switch closes cmd.exe when it is done with the command you send it).

 

I would attach a nice screen shot I took but apparently I have used 497k of by 500k upload quota on this forum!

 

Andy

Hey, send me your receipt and make a nice thread about this awesome work in the tutorials tips and tricks section - and I'll upgrade you to the Customer group, haha. :D

Link to post
Share on other sites
  • 2 months later...

Thanks Andy it worked! :)

 

I tried this, on my computer My documents is on the E drive.

 

Therefor the CMD command is

 

E:\My Documents\foldername

 

 

However when I run this in DOS even manually CMD tell me that "My" is not recognized as a command recognized.

 

But when I put

 

MD c:\folder name

 

IT does.

 

Any pointes Andy?

 

Here's a reference for shell commands in Windows.

http://ss64.com/nt/

Link to post
Share on other sites

I also believe you can use the absolute path which would go something like this:

 

C:\user\(username)\documents\foldername (and/or whatever path you would need to include to get to the E: drive)

Link to post
Share on other sites

I also believe you can use the absolute path which would go something like this:

 

 

 

C:\user\(username)\documents\foldername (and/or whatever path you would need to include to get to the E: drive)

 

what i need to do is be able to string to commands together because my document folder is not in C. it is in e.

 

Is there a way in shell to do the following:

 

cmd.exe e: md blahblah

 

This works when run as two separate queries in shell, but the /c means it can only do one line (as referenced earlier).

Link to post
Share on other sites

Again. Why not have built in functions to take care of this File Management stuff. It makes sense to let the app do the job rather than opening a Command window and praying that the user does it right or even executing the Batch file correctly. Not to mention hoping that the Batch files were correctly copied to begin with.

 

Sorry guys! Today is rant day for me.

Link to post
Share on other sites

Again. Why not have built in functions to take care of this File Management stuff. It makes sense to let the app do the job rather than opening a Command window and praying that the user does it right or even executing the Batch file correctly. Not to mention hoping that the Batch files were correctly copied to begin with.

 

Sorry guys! Today is rant day for me.

 

 

This works fine.

 

BUT when I have two keywords in the UI text box the Shell creates two directories. (EG if keyword is "happy people" I get one folder in the application folder "happy" and another "people"

 

Don't suppose anyone has an idea on this.

 

If I set the files to save to

 

$Application\#Keyword\#Keyword.txt

 

and the folder does not exist. It won't create the folder.

 

I can save files to $application as long as it saves to the root.

 

Pointers most welcome.

 

What I have to do is remove the spaces from keyword field, set that to a variable and use that when creating the folders. How could I remove the space in a UI text box....I think this would be dooable.

 

Ninjaman.

post-157-1283354189349_thumb.png

Link to post
Share on other sites

You can shell to the command prompt to do this. The command for making a folder is 'md', calling cmd.exe with a "/c" (the /c switch closes cmd.exe when it is done with the command you send it).

 

I would attach a nice screen shot I took but apparently I have used 497k of by 500k upload quota on this forum!

 

Andy

 

That's a neat trick with /c. Much thanks!

Link to post
Share on other sites

Okay I lay awake thinking about this.

 

In the absence of any idea how to put two keywords together, and to be able to create folders on the fly, I will add new line to a text files which I then save off.

 

Everytime I run the shell command I can then read the file, add a new line and then use the list total to set the number variable which I use in the MD commmand.

 

That way at least I will get a series of escalating folders by number every times the script runs.

 

Dirty but it will work.

 

Might help someone else.

 

;)

Link to post
Share on other sites
  • 3 weeks later...
  • 2 months later...

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...