|
Answer» I have no clue about MS DOS commands or Creating Batch FILES.
I'm looking for a simple batch file which when executed, copies the contents of the folder that it resides in, into a destination folder that I specify in the code. Also, creates a desktop and a start menu shortcut of one of the files.
Thanks in advance.
Regards, Kalyan VermaI would PLACE the batch outside the folder to be copied otherwise it is trying to COPY itself elsewhere too.
xcopy "c:\foldertobecopied\*.*" "E:\datadestinationfolder\*.*" /s/d/y
This can be used if copying to an external hard drive or thumb drive at drive E to folder NAMED datadestinationfolder. You simply change the path in foldertobecopied and datadestinationfolder to your actual path. "" will be needed if spaces are present in the path such as MY DATA etc. Switches /s/d/y are used to copy latest info if you are going to use for updating edited files at the destination from the source as well as maintains the directory tree associated with the files and agrees to overwriting already existing files and folders if present.
Desktop shortcut can be created by using the Windows Shortcut maker and manually placing the file path in there, then add it to ALL USERS in c:\documents and SETTINGS\ or just your profile in the desktop folder as a *.lnk shortcut file if you just want your profile to have it on your desktop instead of all users.
Hope this helps
Quote from: kalyanverma on September 30, 2009, 12:33:52 PM I have no clue about MS DOS commands or Creating Batch Files.
if you have no clue, start to do some reading by yourself. see wiki and the part where it says external links.
|