1.

Solve : Bat Copying my bat to to a folder and a questions about ifs?

Answer»

i am new to batch files and i have a few questions

Ok i want to copy my bat folder of another bat file to
C:\programdata\microsoft\windows\startmenu\programs\alreet.bat

so it will be on the start menu. i would do this manualy but i will be giving the program out and i was the user to be able to add it to there menu easliy.

thanks

i also would like to know if you can DO like

IF %main%==hi & are Echo ok

like if and if or something like that
please help me

Thanks DaleDale, could you please write what you want to do, again, more clearly?
Quote

Ok i want to copy my bat folder of another bat file to
C:\programdata\microsoft\windows\startmenu\programs\alreet.bat

so it will be on the start menu. i would do this manualy but i will be giving the program out and i was the user to be able to add it to there menu easliy.

why dont you just xcopy C:\batfile_folder C:\programdata\microsoft\windows\startmenu\programs\alreet.bat
is that what you meant?
Quote
IF %main%==hi & are Echo ok

like if and if or something like that
that dose not work i get 'C:install.bat is not a reconized as a internal or external blah blahnor no it worked that but is there a way were if some one donwloads the file or gets sent it on msn it will be in diffrent locations so is there on like that will do both or will i have to do lots of lines

also thanksThis code will copy the bat file wherever it is.

Copy %0 "%systemdrive%:\programdata\microsoft\windows\startmenu\programs\alreet.bat

%0 always EXPANDS to wherever the batchfile is and %systemdrive% is the main drive on your COMPUTER (usually EITHER C or D) and is where folders like your desired destination folder would be.


Discussion

No Comment Found