Jump to content

look at this would you please


Recommended Posts

The top line I hav commented out works with the drive letter in it . but i want to be able to put the drice letter in and it won't work ? what do I have wrong ?

;;RunWait(@COMSPEC & " /c Dir C:\  > dir.txt")
$answer = InputBox("Question", "Enter drive  letter below ", "what dir", "", -1,-1, 30, 30)
$str = @Comspec & " /k Dir """ & @ScriptDir &" " & $answer & " > dir.txt"
Run($str)
Runwait("notepad.exe "&@Scriptdir&"\dir.txt",@WindowsDir,)

if you have the time .

Link to comment
Share on other sites

it's more or less the same as what you did. However, I cut out a lot of the extra stuff. To keep it a little more simplified.

with the input box I just used the defaults by not providing extra variables

for the actual command.. rather than attaching it to a variable I just went straight ahead and performed it.

It's often better to find the most straight forward method of executing your tasks.

the less lines you need to look at the less work you need to do to update or fix your scripts in the end.

moo

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...