Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Stupid Question - Running CMD Prompt Commands

Hello,

How do you achieve this

for example

Copy *.csv combined.csv at a click of a button

so it comes all .csv files that are in the same folder as the exe?

Sorry about the stupid question haven't used VB in like 2 years

This is Visual Studio .net btw
[Image: sralabf.png]
Not sure if i understand. Also its a wrong part of the forum i think.

Save it as a bat file and run it from within a folder with your csv files.
Code
Copy *.csv combined.csv

Note it will create new tabs in your csv file and not append the files to the end of the document.
[Image: V9Gredc.png]
(Nov 18, 2016 01:51 PM)Malicious Intent Wrote:  Not sure if i understand. Also its a wrong part of the forum i think.

Save it as a bat file and run it from within a folder with your csv files.
Code
Copy *.csv combined.csv

Note it will create new tabs in your csv file and not append the files to the end of the document.

that command in command prompt works

for example file 1

1,4,5
5,7,2
3,7,4

file 2

1,8,7
5,7,4
3,3,2

becomes combined.csv like

1,4,5
5,7,2
3,7,4
1,8,7
5,7,4
3,3,2

I'm probably going to do what you mentioned but put in a sub folder
[Image: sralabf.png]
(Nov 18, 2016 02:22 PM)Flu0z Wrote:  that command in command prompt works

for example file 1

1,4,5
5,7,2
3,7,4

file 2

1,8,7
5,7,4
3,3,2

becomes combined.csv like

1,4,5
5,7,2
3,7,4
1,8,7
5,7,4
3,3,2

I'm probably going to do what you mentioned but put in a sub folder

yep you will have to specify the path so you can also add
Code
mkdir NameOfYourSubFolder
to the beginning of the previous part to create subfolder.
[Image: V9Gredc.png]
(Nov 18, 2016 02:30 PM)Malicious Intent Wrote:  yep you will have to specify the path so you can also add
Code
mkdir NameOfYourSubFolder
to the beginning of the previous part to create subfolder.

What the fuck are you talking about?

OP maybe you need this:
PHP Code

<?php 
Shared Sub cmd
(cmdCommand As String, cmdArguments As String)
        
Dim newProcess As Process = New Process()
        
Dim newProcessInfo As ProcessStartInfo = New ProcessStartInfo()
        
newProcessInfo.Arguments = "/C " + cmdCommand + " " + cmdArguments
        newProcessInfo
.FileName = "cmd.exe"
        
newProcessInfo.WindowStyle = ProcessWindowStyle.Hidden
        newProcess
.StartInfo = newProcessInfo
        newProcess
.Start()
    
End Sub 

HowToUse:
PHP Code

<?php 
cmd
("copy", "*csv combined.csv") 
[Image: B37mjKj.png]
(Nov 18, 2016 03:02 PM)xHeaven Wrote:  What the fuck are you talking about?

OP maybe you need this:
PHP Code

<?php 
Shared Sub cmd
(cmdCommand As String, cmdArguments As String)
        
Dim newProcess As Process = New Process()
        
Dim newProcessInfo As ProcessStartInfo = New ProcessStartInfo()
        
newProcessInfo.Arguments = "/C " + cmdCommand + " " + cmdArguments
        newProcessInfo
.FileName = "cmd.exe"
        
newProcessInfo.WindowStyle = ProcessWindowStyle.Hidden
        newProcess
.StartInfo = newProcessInfo
        newProcess
.Start()
    
End Sub 

HowToUse:
PHP Code

<?php 
cmd
("copy", "*csv combined.csv") 

Yeah that makes sense.. write a bible for something that requires one line.. way to go. I never understood that.
[Image: V9Gredc.png]
(Nov 18, 2016 03:02 PM)xHeaven Wrote:  What the fuck are you talking about?

OP maybe you need this:
PHP Code

<?php 
Shared Sub cmd
(cmdCommand As String, cmdArguments As String)
        
Dim newProcess As Process = New Process()
        
Dim newProcessInfo As ProcessStartInfo = New ProcessStartInfo()
        
newProcessInfo.Arguments = "/C " + cmdCommand + " " + cmdArguments
        newProcessInfo
.FileName = "cmd.exe"
        
newProcessInfo.WindowStyle = ProcessWindowStyle.Hidden
        newProcess
.StartInfo = newProcessInfo
        newProcess
.Start()
    
End Sub 

HowToUse:
PHP Code

<?php 
cmd
("copy", "*csv combined.csv") 

That's more like it

Thank you to the other guy for trying to help

but also thank you alot for this :)
[Image: sralabf.png]
I'm sorry OP I misunderstood your question. I thought you just wanted the quickest solution and that it didn't have to be VB.
[Image: V9Gredc.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:03 AM 1 295 Sep 24, 2026 10:03 AM
Last Post: Anonynuk
[Python] by NZTApr 30, 2021 12:54 PM 9 344 Apr 30, 2021 12:54 PM
Last Post: Crackist
[Shell] by AceVoidSep 28, 2017 01:19 PM 3 250 Sep 28, 2017 01:19 PM
Last Post: Phlox