If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DOS Commands
Frequently I need to boot to the DOS Prompt to deal with
some files that may not be accessible within the Windows environment. More often than not, it becomes very tedious to having to retype long entries when navigating thru folders and subfolders after entering incorrectly typed commands on the first try or when going forward or backwards in the search of the files(s) of interest. My questions a 1. What are the Commands most successful to search for a hidden file while at the C:\ Prompt? 2. What is the best command to change File attributes for one or more files in a given Folder and at what stage in the depth of Subfolders.....main Folder or Subs? 3. When in a main Folder that has subfolders which, in turn, have other subfolders....,are there ways to avoid retyping cd\ commands to go search the various subfolders when the string is broken by other Commands like a Dir? Example: I have used Index.dat QV that shows hidden subfolders, like C:\Windows\History\History.IE5\Index.dat To deal with that Index.dat File I need to issue the command cd\windows\history\ and since the History.IE5 is a hidden File, I would need to change its attribute by typing: (the command for attribute change) plus c:\windows\history\history.ie5 then type Dir to see if History.ie5 is shown If not shown, I would have to go over the whole process. If shown, I would have to change the Attribute of the Index.dat by typing (the command for attribute change) plus c:\windows\history\history.ie5\Index.dat Then type the Command Dir to see if Index.dat is there. 4. If a Folder has only one Subfolder, is there a way to navigate between the two of them without retyping the whole Command line each time? 5. If for some reason I go part way to the appropriate subdirectory and issue a Dir at a given moment and want to continue to the next lower subfolder, would I have to retype the entire line (since F1 or F3 is no longer available) or is there some shortcut? Using Windows98SE Sorry for this long write-up. Thank you to anyone who may be interested and willing to help! |
#2
|
|||
|
|||
*Some* of your issues can be resolved by loading DOSKEY at the start of the DOS
session, and using it to recall past commands. Type DOSKEY /? to see the optional parameters, and learn to use it. You can use your back arrow key to go to a point in a command line and change just part of it, without typing the whole command over. -- Glen Ventura, MS MVP W95/98 Systems http://dts-l.org/goodpost.htm "BP" wrote in message ... Frequently I need to boot to the DOS Prompt to deal with some files that may not be accessible within the Windows environment. More often than not, it becomes very tedious to having to retype long entries when navigating thru folders and subfolders after entering incorrectly typed commands on the first try or when going forward or backwards in the search of the files(s) of interest. My questions a 1. What are the Commands most successful to search for a hidden file while at the C:\ Prompt? 2. What is the best command to change File attributes for one or more files in a given Folder and at what stage in the depth of Subfolders.....main Folder or Subs? 3. When in a main Folder that has subfolders which, in turn, have other subfolders....,are there ways to avoid retyping cd\ commands to go search the various subfolders when the string is broken by other Commands like a Dir? Example: I have used Index.dat QV that shows hidden subfolders, like C:\Windows\History\History.IE5\Index.dat To deal with that Index.dat File I need to issue the command cd\windows\history\ and since the History.IE5 is a hidden File, I would need to change its attribute by typing: (the command for attribute change) plus c:\windows\history\history.ie5 then type Dir to see if History.ie5 is shown If not shown, I would have to go over the whole process. If shown, I would have to change the Attribute of the Index.dat by typing (the command for attribute change) plus c:\windows\history\history.ie5\Index.dat Then type the Command Dir to see if Index.dat is there. 4. If a Folder has only one Subfolder, is there a way to navigate between the two of them without retyping the whole Command line each time? 5. If for some reason I go part way to the appropriate subdirectory and issue a Dir at a given moment and want to continue to the next lower subfolder, would I have to retype the entire line (since F1 or F3 is no longer available) or is there some shortcut? Using Windows98SE Sorry for this long write-up. Thank you to anyone who may be interested and willing to help! |
#3
|
|||
|
|||
Thank you, Glen!
Will get busy on your suggestios. -----Original Message----- *Some* of your issues can be resolved by loading DOSKEY at the start of the DOS session, and using it to recall past commands. Type DOSKEY /? to see the optional parameters, and learn to use it. You can use your back arrow key to go to a point in a command line and change just part of it, without typing the whole command over. -- Glen Ventura, MS MVP W95/98 Systems http://dts-l.org/goodpost.htm |
#4
|
|||
|
|||
Hope I understood all the Q's right...
1. What are the Commands most successful to search for a hidden file while at the C:\ Prompt? dir /ah 2. What is the best command to change File attributes for one or more files in a given Folder and at what stage in the depth of Subfolders.....main Folder or Subs? attrib -a -r -h -s /s 3. When in a main Folder that has subfolders which, in turn, have other subfolders....,are there ways to avoid retyping cd\ commands to go search the various subfolders when the string is broken by other Commands like a Dir? cd \windows\folder cd .. -= gets you to c:\windows cd .\foler2 -= gets you to c:\windows\folder\folder2 4. If a Folder has only one Subfolder, is there a way to navigate between the two of them without retyping the whole Command line each time? Above 5. If for some reason I go part way to the appropriate subdirectory and issue a Dir at a given moment and want to continue to the next lower subfolder, would I have to retype the entire line (since F1 or F3 is no longer available) or is there some shortcut? ?... Are you trying to manually delete all the items in the History in DOS? |
#5
|
|||
|
|||
BP,
If you are using DOS and you are in the System subdirectory under Windows main directory and you want to go back to just the Windows directory without typing the whole string over again, at the C:\Windows\System command prompt type in [cd..] without the brackets, and hit enter. That will take you back to C:\Windows and this works in any subdirectory at any level on any drives' main directory or partition. Also if you are at the C:\Windows command prompt and would like to go into the System subdirectory without typing in cd\windows\system and hitting enter just type in [cd system] with a space between cd and system as shown, and hit enter. If you are searching for a particular file under a main or subdirectory there is several easy ways to do this so I will just give you a few ideas, but you can experiment with these easily after you understand the basic concept or format to use. At any prompt (I'll just say C: for now), you can type in [dir *.txt/p/w] and this will list to you only all the txt files in whatever directory you are currently in or its' subdirectory if that is where you are currently in. That's if you don't know the filename (note the wildcard *), but you do know the file extension. /p/w just tells DOS to list the results by (p)age and to list several pages of results into one single (w)indow just in case there are 100's of txt files in that directory or subdirectory. You can also switch the wildcard around if you know the filename, but do not know the filename extension. And if you don't remember the filename, but you know it begins with a certain letter like g...then you can type in [dir g*.exe/p/w] and that will give you all the exe files in that directory or subdirectory which begin with the letter g. There's a lot of shortcuts and more efficient ways to navigate or utilize DOS commands than you'd probably expect. I learned most on my own, but you can also get quick reference books at any computer section in a bookstore, or even find a lot of them online just by searching DOS Commands into a search field of any browser and you can also use DOS itself to learn a few filename abbreviations as commands in the C:\Windows\Command subdirectory as one example. I think between all the replys here we've all your answers and more! Good Luck! SC |
#6
|
|||
|
|||
chop chop...
concept or format to use. At any prompt (I'll just say C: for now), you can type in [dir *.txt/p/w] and this will list to you only all the txt files in whatever directory you are currently in or its' subdirectory if that is where you are currently in. You can add [/s] to that to make it [dir *.txt /p /w /s] and it will search in the current directory your are in, and all its subdirectories (recurSive). Btw, mustn't there be a space after *.txt? otherwise DOS might think you want a really odd file extension? |
#7
|
|||
|
|||
Thanks, Travis!
Not trying to delete anything. That was an example that I thought might show the string of Folders and Subfolders that could come into play for explaining my questions. Your response does show shortcuts that may answer some of my questions. I need to try them, assuming I understood them correctly. I assume these commands are entered at the C:\ prompt. dir /ah h = hidden not sure about 'a' Dos this command show all hidden files? attrib -a -r -h -s /s I assume this disables the hidden attribute for all hidden files. cd \windows\folder cd .. -= gets you to c:\windows cd .\folder2 -= gets you to c:\windows\folder\folder2 This is great! These are the sort of things I was hoping would be available. Thank you, again! ------------------------------------------- -----Original Message----- Hope I understood all the Q's right... 1. What are the Commands most successful to search for a hidden file while at the C:\ Prompt? dir /ah 2. What is the best command to change File attributes for one or more files in a given Folder and at what stage in the depth of Subfolders.....main Folder or Subs? attrib -a -r -h -s /s 3. When in a main Folder that has subfolders which, in turn, have other subfolders....,are there ways to avoid retyping cd\ commands to go search the various subfolders when the string is broken by other Commands like a Dir? cd \windows\folder cd .. -= gets you to c:\windows cd .\foler2 -= gets you to c:\windows\folder\folder2 4. If a Folder has only one Subfolder, is there a way to navigate between the two of them without retyping the whole Command line each time? Above 5. If for some reason I go part way to the appropriate subdirectory and issue a Dir at a given moment and want to continue to the next lower subfolder, would I have to retype the entire line (since F1 or F3 is no longer available) or is there some shortcut? ?... Are you trying to manually delete all the items in the History in DOS? . |
#8
|
|||
|
|||
Thank you, SC!
Simply overwhelming amount of information from all of you...Glen, Travis and you. I just hope to understand and make good use of your suggestions. ----------------------------------------- -----Original Message----- BP, If you are using DOS and you are in the System subdirectory under Windows main directory and you want to go back to just the Windows directory without typing the whole string over again, at the C:\Windows\System command prompt type in [cd..] without the brackets, and hit enter. That will take you back to C:\Windows and this works in any subdirectory at any level on any drives' main directory or partition. Also if you are at the C:\Windows command prompt and would like to go into the System subdirectory without typing in cd\windows\system and hitting enter just type in [cd system] with a space between cd and system as shown, and hit enter. If you are searching for a particular file under a main or subdirectory there is several easy ways to do this so I will just give you a few ideas, but you can experiment with these easily after you understand the basic concept or format to use. At any prompt (I'll just say C: for now), you can type in [dir *.txt/p/w] and this will list to you only all the txt files in whatever directory you are currently in or its' subdirectory if that is where you are currently in. That's if you don't know the filename (note the wildcard *), but you do know the file extension. /p/w just tells DOS to list the results by (p)age and to list several pages of results into one single (w)indow just in case there are 100's of txt files in that directory or subdirectory. You can also switch the wildcard around if you know the filename, but do not know the filename extension. And if you don't remember the filename, but you know it begins with a certain letter like g...then you can type in [dir g*.exe/p/w] and that will give you all the exe files in that directory or subdirectory which begin with the letter g. There's a lot of shortcuts and more efficient ways to navigate or utilize DOS commands than you'd probably expect. I learned most on my own, but you can also get quick reference books at any computer section in a bookstore, or even find a lot of them online just by searching DOS Commands into a search field of any browser and you can also use DOS itself to learn a few filename abbreviations as commands in the C:\Windows\Command subdirectory as one example. I think between all the replys here we've all your answers and more! Good Luck! SC . |
#9
|
|||
|
|||
On Thu, 30 Sep 2004 04:01:16 -0700, "BP"
Frequently I need to boot to the DOS Prompt to deal with some files that may not be accessible within the Windows environment. More often than not, it becomes very tedious to having to retype long entries LH DOSKey /Insert After that, you get a command prompt that catches up with what 1980-era home computers would consider standard - i.e. you can edit (rather than backspace) your command line, and use Up arrow to scroll through previous commands, just as nature intended. 1. What are the Commands most successful to search for a hidden file while at the C:\ Prompt? Dir /A shows all files, irrespective of hidden or system attributes 2. What is the best command to change File attributes for one or more files in a given Folder and at what stage in the depth of Subfolders.....main Folder or Subs? Attrib -s {filename} clears system attribute Attrib +s {filename} sets system attribute Attrib -h {filename} clears hidden attribute Attrib +h {filename} sets hidden attribute Use Attrib /S to recurse into subdirs, but be careful you don't affect things that should be left alone! For example... Attrib -r -s -h C:\Windows /S ....would clear these attributes off the Fonts folder, and certain things would be broken by that alone. 3. When in a main Folder that has subfolders which, in turn, have other subfolders....,are there ways to avoid retyping cd\ commands to go search the various subfolders when the string is broken by other Commands like a Dir? Eh? Example: I have used Index.dat QV that shows hidden subfolders, like C:\Windows\History\History.IE5\Index.dat To deal with that Index.dat File I need to issue the command cd\windows\history\ and since the History.IE5 is a hidden File, I would need to change its attribute by typing: (the command for attribute change) plus c:\windows\history\history.ie5 then type Dir to see if History.ie5 is shown If not shown, I would have to go over the whole process. If shown, I would have to change the Attribute of the Index.dat by typing (the command for attribute change) plus c:\windows\history\history.ie5\Index.dat Then type the Command Dir to see if Index.dat is there. You may find Dir /A /S will fail to show items in directories ("folders") that are themselves hidden, system, etc. You can either clear the attributes on those directories first, or use something like LL3.exe /L (or other 3rd-partyware) that can recurse and manage files like DOSShell or better. It's generally a good idea to operate on files under direct vision than to wildcard around, especially when you are recursing into subtrees as well. 4. If a Folder has only one Subfolder, is there a way to navigate between the two of them without retyping the whole Command line each time? CD .. goes up a level. Use DOSKey to reduce retyping. 5. If for some reason I go part way to the appropriate subdirectory and issue a Dir at a given moment and want to continue to the next lower subfolder, would I have to retype the entire line (since F1 or F3 is no longer available) or is there some shortcut? Use DOSKey to reduce retyping. Bind DOSKey into "Exit to DOS.pif" 's private Autoexec.bat, or DOSStart.bat, and into Command.com's Properties as the "batch file". --------------- ----- ---- --- -- - - - Hello DOS mode my old friend I've come to hack with you again --------------- ----- ---- --- -- - - - |
#10
|
|||
|
|||
That DOSKEY is being mentioned frequently by all you
experts. I really appreciate the suggestions. Just wondering if I will be sharp enough to take good advantage of it all. Thanks cquirke and all! --------------------- -----Original Message----- On Thu, 30 Sep 2004 04:01:16 -0700, "BP" Frequently I need to boot to the DOS Prompt to deal with some files that may not be accessible within the Windows environment. More often than not, it becomes very tedious to having to retype long entries LH DOSKey /Insert After that, you get a command prompt that catches up with what 1980-era home computers would consider standard - i.e. you can edit (rather than backspace) your command line, and use Up arrow to scroll through previous commands, just as nature intended. 1. What are the Commands most successful to search for a hidden file while at the C:\ Prompt? Dir /A shows all files, irrespective of hidden or system attributes 2. What is the best command to change File attributes for one or more files in a given Folder and at what stage in the depth of Subfolders.....main Folder or Subs? Attrib -s {filename} clears system attribute Attrib +s {filename} sets system attribute Attrib -h {filename} clears hidden attribute Attrib +h {filename} sets hidden attribute Use Attrib /S to recurse into subdirs, but be careful you don't affect things that should be left alone! For example... Attrib -r -s -h C:\Windows /S ....would clear these attributes off the Fonts folder, and certain things would be broken by that alone. 3. When in a main Folder that has subfolders which, in turn, have other subfolders....,are there ways to avoid retyping cd\ commands to go search the various subfolders when the string is broken by other Commands like a Dir? Eh? Example: I have used Index.dat QV that shows hidden subfolders, like C:\Windows\History\History.IE5\Index.dat To deal with that Index.dat File I need to issue the command cd\windows\history\ and since the History.IE5 is a hidden File, I would need to change its attribute by typing: (the command for attribute change) plus c:\windows\history\history.ie5 then type Dir to see if History.ie5 is shown If not shown, I would have to go over the whole process. If shown, I would have to change the Attribute of the Index.dat by typing (the command for attribute change) plus c:\windows\history\history.ie5\Index.dat Then type the Command Dir to see if Index.dat is there. You may find Dir /A /S will fail to show items in directories ("folders") that are themselves hidden, system, etc. You can either clear the attributes on those directories first, or use something like LL3.exe /L (or other 3rd-partyware) that can recurse and manage files like DOSShell or better. It's generally a good idea to operate on files under direct vision than to wildcard around, especially when you are recursing into subtrees as well. 4. If a Folder has only one Subfolder, is there a way to navigate between the two of them without retyping the whole Command line each time? CD .. goes up a level. Use DOSKey to reduce retyping. 5. If for some reason I go part way to the appropriate subdirectory and issue a Dir at a given moment and want to continue to the next lower subfolder, would I have to retype the entire line (since F1 or F3 is no longer available) or is there some shortcut? Use DOSKey to reduce retyping. Bind DOSKey into "Exit to DOS.pif" 's private Autoexec.bat, or DOSStart.bat, and into Command.com's Properties as the "batch file". --------------- ----- ---- --- -- - - - Hello DOS mode my old friend I've come to hack with you again --------------- ----- ---- --- -- - - - . |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DOS net commands | Software & Applications | 0 | September 16th 04 08:12 AM | |
Delayed response to mouse commands | Jay | Hardware | 0 | July 7th 04 04:21 PM |
Delayed response to mouse commands | Jay | General | 1 | July 3rd 04 09:11 PM |
two (2) open commands | terry | General | 1 | July 1st 04 06:09 PM |
Keyboard Commands in Executables | News Reader | General | 2 | June 25th 04 01:53 AM |