Jump to content

Using variables in _RunDOs()


slayerz
 Share

Recommended Posts

Hello everyone...

I'm trying to compress my files using 7zip (stand-alone version)

and I'm using command DOS to accomplish it

7z a "archieve name.7z"  "source files\"oÝ÷ Ú«¨µª®¢×(f§vgÆuªÜ'¯zØ^kÊÚ zÛazƦz·¬º[n²)àFéâÆpk+ z׫®ìjëh×6_RunDos('7z a "archieve name.7z"  "source files\" ')

...and is it possibble to use variables in _RunDos ?

I want to use variable for archieve name and source files...

sorry for my noob question....

AUTOIT[sup] I'm lovin' it![/sup]

Link to comment
Share on other sites

Hello everyone...

I'm trying to compress my files using 7zip (stand-alone version)

and I'm using command DOS to accomplish it

7z a "archieve name.7z"  "source files\"oÝ÷ Ú«¨µª®¢×(f§vgÆuªÜ'¯zØ^kÊÚ zÛazƦz·¬º[n²)àFéâÆpk+ z׫®ìjëh×6_RunDos('7z a "archieve name.7z"  "source files\" ')

...and is it possibble to use variables in _RunDos ?

I want to use variable for archieve name and source files...

sorry for my noob question....

White #include <Process.au3>

#include <Process.au3>
$command = "Notepad.exe"
_RunDOS ($command )

or

White Out #include <Process.au3>

$command = "Notepad.exe"
_RunDOS ($command )


Func _RunDOS($sCommand)
    Return RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE)
EndFunc  ;==>_RunDOS

صرح السماء كان هنا

 

Link to comment
Share on other sites

thanks 'wolf9228' for ur reply...I cannot test your script yet bcoz I'm not using my pc rite now...

I'll inform later....TQ

Example

$path1 = "C:\dos\7zEXeDir\"
$path2= "C:\dos\temp\"
$path3 = "C:\dos\sourceDir\"
$name1= "outfile.7z"
$name2= "INfile1.txt"
$name3= "INfile2.txt"
$command = $path1 & "7z.exe a "   & $path2 & $name1  & " " & $path3 & $name2 & " " & $path3 & $name3
_RunDOS($command)

Func _RunDOS($sCommand)
    Return RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE)
EndFunc

صرح السماء كان هنا

 

Link to comment
Share on other sites

Example

$path1 = "C:\dos\7zEXeDir\"
$path2= "C:\dos\temp\"
$path3 = "C:\dos\sourceDir\"
$name1= "outfile.7z"
$name2= "INfile1.txt"
$name3= "INfile2.txt"
$command = $path1 & "7z.exe a "   & $path2 & $name1  & " " & $path3 & $name2 & " " & $path3 & $name3
_RunDOS($command)

Func _RunDOS($sCommand)
    Return RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE)
EndFunc

Thanks man! Its working now! :)

I'd tried both solutions and both are working...

thanks again

AUTOIT[sup] I'm lovin' it![/sup]

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...