madbull Posted December 21, 2007 Posted December 21, 2007 I have 2 files (1 & 2) on the desktop and want to copy them to system32:I am trying this - copy 1 + 2 %systemroot%\system32but its not working.I would also like to do the same but removing 2 files: Sodel %systemroot%\system32\ 1 2.i know that this is wrong;can anyone show me where i'm going wrong and the correct way(s).Thanks,PS.It doesn't matter if the file has an extension or not;that is to say if you give me an example you can add an extension to the files if you want.
Mordac85 Posted December 21, 2007 Posted December 21, 2007 QED, you just need to handle them one at a time like so:copy %userprofile%\Desktop\1 %SystemRoot%\system32copy %userprofile%\Desktop\2 %SystemRoot%\system32And then to delete:del %SystemRoot%\system32\1del %SystemRoot%\system32\2
madbull Posted December 22, 2007 Author Posted December 22, 2007 QED, you just need to handle them one at a time like so:copy %userprofile%\Desktop\1 %SystemRoot%\system32 copy %userprofile%\Desktop\2 %SystemRoot%\system32And then to delete:del %SystemRoot%\system32\1 del %SystemRoot%\system32\2Yes thats true, its just it says you can do it for multiple files i assumed that meant something similar to the above (my example).Thanks for the reply (has helped clear up this matter),
Yzöwl Posted December 22, 2007 Posted December 22, 2007 pushd %systemroot%\system32del 1.ext 2.extpopd
madbull Posted December 22, 2007 Author Posted December 22, 2007 pushd %systemroot%\system32 del 1.ext 2.ext popdDear Yzöwl,Do you mean to say this will do what i wanted and secondly how?What is that push part is that an option of the del command or another command?Thanks a mil,PS.I'm not sure if you've heard of the application i am creating but you will be featured (with your permission) along with all the others who have helped.
Yzöwl Posted December 22, 2007 Posted December 22, 2007 The pushd and popd were used to move me to a location and return me to my start point again after running the deletion. The same task could have been performed without that addition thus:del "%systemroot%\system32\1.ext" "%systemroot%\system32\2.ext"It appears that you are trying to create something which is making a smaller OS source. If this is the case and you are removing OS files you may need to use:DEL /F /A [file(s)]
madbull Posted December 22, 2007 Author Posted December 22, 2007 The pushd and popd were used to move me to a location and return me to my start point again after running the deletion. The same task could have been performed without that addition thus:del "%systemroot%\system32\1.ext" "%systemroot%\system32\2.ext"It appears that you are trying to create something which is making a smaller OS source. If this is the case and you are removing OS files you may need to use:DEL /F /A [file(s)]Yes i do somtimes use those options (force delete of read only files and the attribute option)Thanks once again you have been a major help,
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now