Convert cmd to batch file

August 3rd, 2013

Hi,
can anyone help me to convert cmd command into a batch file?
I want to convert this cmd command into a batch file.
‘ attrib +s +h d:\newfile ‘
Thanks

Answer #1
You already have.
Answer #2
im on winxp and i want to create a batch file for that cmd command…
Im not getting you !
Answer #3
You just need to paste what you have in quotes (without them) into a new text file, then rename it to .bat
Answer #4
You could also replace the path and file name with a ‘%1’ (without quotes).
Answer #5
@.GhostShot. – Thanks
@-paroxysM^ – can you show me a demo – please
Answer #6
attrib +s +h d:\newfile
copy paste the code in notepad..
give save/save as..
give any name with .bat extension
for eg: file.bat
below the name field give all files in save as type like shown in this pic..
n click save..
ur batch file’s ready!!

Answer #7
mkmovies: it will allow you to pass a parameter to the batch file which is often more convenient than hardcoding paths. You can then invoke the bat file like this: “mybatfile D:\newfile”
Answer #8
right nw im replying through my fon…
Thank you all for the support.
I have one question i.e.
Can we limit file/folder access through batch command ?
Answer #9
You can then invoke the bat file like this: "mybatfile D:\newfile"
Or just drag and drop the file.
Answer #10
Well, that would be more simple didn’t think about that^^
mkmovies: Most likely, yes. But it’s probably a pain to do unless you switch to some decent scripting language like Python. (most things are painful unless you simply want to start some applications IMHO)
Answer #11
Can we limit file/folder access through batch command ?Why? You can. But why? Just use the security tab in properties like everyone else.
Answer #12
@-paroxysM^ – yes, i can use the sec. tab but im a bit lazy thats why i want to create a batch command…
Answer #13
.GhostShot. replied: mkmovies: Most likely, yes. But it's probably a pain to do unless you switch to some decent scripting language like Python. (most things are painful unless you simply want to start some applications IMHO)
Can you explain me a bit briefly – please [i love to learn new things but life is too short]
And if python can do things like i want then please suggest me some tuts for this ….

 

| Sitemap |