How to make a .bat file that won't show any sort of prompt

xerolen

In Runtime
Messages
279
Ok so I want to be able to create a batch file that will use the xcopy command to copy files from one directory to my usb drive without showing any sort of prompt or any sort of notification about it.

so far this is what I have:

start cmd.exe /c
xcopy /s/h C:\Users\Corinas\ D:\copiedfiles

unfortunately it will show the command prompt every time. I was told that the /c when applied to cmd.exe would hide it. sadly it won't anyone have any suggestions or ideas for me to try?
 
echo off is just gonna prevent certain output from showing in the console window. the black box will still appear.

it may be possible to make a batch file with only the xcopy command. then, create a new shortcut that runs "cmd /c batchfilename.bat"

however, i would use vbscript for this. make a new txt file and name it filename.vbs then insert the code shown below.

DevGuru WSH Method: WshShell.Run

Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
intReturn = WshShell.Run("notepad " & WScript.ScriptFullName, 0, TRUE)
 
Back
Top Bottom