Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used following command to restrict edits to a file:

attrib +r C:\temp\attributes.txt

Whenever I try to edit and save them, I am prompted with 'Save As' dialog which has 'C:\temp' as default location. Is there any way for 'Save As' dialog box to always go to default folder of my choice which is 'D:\project' ?

Any suggestions would be appreciative.

share|improve this question

I would suggest you use autohotkey. you can create a script like this:

; wait until the Save As dialog appears
WinWaitActive,Save As
; jump to the target dir
send D:\project{enter}
; wait until the Save As dialog gone
WinWaitNotActive,Save As

so when the save as diagol pops up, autohotkey will automatically switch dir for you.

share|improve this answer
Thanks. I am beginner with DOS and never heard of autohotkey. How do you suggest I should run above script? – Ibe Mar 4 '14 at 6:50
google autohotkey. autohotkey is an open source software for windows automation. – David Dai Mar 4 '14 at 7:11
The only problem with this ahk is that whatever file I am closing is leading me to default set for only one program. I want 'D:\project' to be used for only one program. – Ibe Mar 6 '14 at 7:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.