Nov 18, 2016 01:47 PM
(This post was last modified: Nov 18, 2016 01:50 PM by Flu0z.)
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
Nov 18, 2016 01:51 PM
(This post was last modified: Nov 18, 2016 01:53 PM by Malicious Intent.)
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.
(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
Nov 18, 2016 02:30 PM
(This post was last modified: Nov 18, 2016 02:31 PM by Malicious Intent.)
(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.
(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")
(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.
(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 :)
Nov 18, 2016 03:30 PM
(This post was last modified: Nov 18, 2016 03:46 PM by Malicious Intent.)
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.
|