Kreatus (Ubot Ninja) 422 Posted June 21, 2010 Report Share Posted June 21, 2010 How to create New Folder with chosen filename in Ubot??? Please advice... Quote Link to post Share on other sites
Net66 54 Posted June 21, 2010 Report Share Posted June 21, 2010 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 Quote Link to post Share on other sites
Net66 54 Posted June 21, 2010 Report Share Posted June 21, 2010 Have put the screen shot here: http://www.66th.net/makefolder.JPG Quote Link to post Share on other sites
alcr 135 Posted June 21, 2010 Report Share Posted June 21, 2010 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! AndyHey, 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. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted June 21, 2010 Author Report Share Posted June 21, 2010 Thanks Andy it worked! Quote Link to post Share on other sites
theninjamanz 29 Posted August 27, 2010 Report Share Posted August 27, 2010 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/ Quote Link to post Share on other sites
Net66 54 Posted August 27, 2010 Report Share Posted August 27, 2010 Therefor the CMD command is E:\My Documents\foldername Nope... the command is... MD E:\My Documents\foldername Andy Quote Link to post Share on other sites
JohnB 255 Posted August 27, 2010 Report Share Posted August 27, 2010 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) Quote Link to post Share on other sites
theninjamanz 29 Posted August 27, 2010 Report Share Posted August 27, 2010 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). Quote Link to post Share on other sites
UBotBuddy 331 Posted August 27, 2010 Report Share Posted August 27, 2010 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. Quote Link to post Share on other sites
theninjamanz 29 Posted September 1, 2010 Report Share Posted September 1, 2010 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. Quote Link to post Share on other sites
meter 145 Posted September 2, 2010 Report Share Posted September 2, 2010 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! Quote Link to post Share on other sites
theninjamanz 29 Posted September 2, 2010 Report Share Posted September 2, 2010 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. Quote Link to post Share on other sites
emp 2 Posted September 20, 2010 Report Share Posted September 20, 2010 Yes, what is up with this, Seth? This should be easy to set up in .net, what gives? ::emp:: Quote Link to post Share on other sites
Guerrilla 19 Posted December 19, 2010 Report Share Posted December 19, 2010 I just discovered with MD command you can setup multiple folders at once with one command like: md folder1 folder2 folder3 Thought I'd relay it here as it helped me out when I discovered this. 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.