Jump to content

Can somone help me with this project

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
hi everyone im making a mistake in my vb project it use cmd commands

the code of the cmd looks like this

copy /b "c:\file.jpg" + "c:\file.rar" "c:\new.jpg"
how to use it now on my vb when
file.jpg is text1 and file.rar is text2 and new.jpg is text3 on the command buttom the code should execute

i tryed somthing like this
shell "copy /b" & " " & """ & "c:\" & text1.text & ".jpg" & """ etc etc etc can some help me pls :D

#2
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
create a bat file from that code and then execute the bat

#3
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
no i want to use the shell command but im making something wrong it doesent work the code that you see isent compled

i want to insert it to a command button and when the button gets klicked it execute the command with text1 text2 text3 :D

#4
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
it's gonna be a problem because copy is a shell command and not a file, so it says file not found.

#5
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
yes i know but i know that i can use batch commands when i use shell example shell "shutdown -s -t 60"
i need that to the problem is im making some mistakes cuz theres a lot & like you see

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
You know why that works? Because in the system32 folder there is a file named shutdown.exe, if there wasn't that file that command would not execute like the copy command!

#7
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
So do you mean i cant use that command even if its a batch command ?

#8
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
You can create a batch file using VisualBasic and then execute it. But you cannot run that command directly using the shell command.