Jump to content

run command and variable question


anybastard
 Share

Recommended Posts

Hi guys ,

please, i need your help

On my script i need run this command

run (@SystemDir & "\fsutil.exe file createnew  c:\test4.txt 52428800")

this code works fine, i have on my path C:\ a file test4.txt

But unfortunatly the path ( c:\ ) is variable, it could be d:\ or f:\

Now i have my correct path in a variable for example $from .

Is possible include my variable on previous command ?

example

run (@SystemDir & "\fsutil.exe file createnew  '$from' test4.txt 52428800")

Thanks so much

Best Regards

AnyB

Thanks

Link to comment
Share on other sites

Does this work?

And dont forget to use :\ in the variable..

But if you put a :\ at the end of the variable in the script you can only worry about using a letter as the variable.

run (@SystemDir & '\fsutil.exe file createnew  ' & $from & 'test4.txt 52428800')

EDIT: use this to only have a letter as the variable

run (@SystemDir & '\fsutil.exe file createnew  ' & $from & ':\test4.txt 52428800')
Edited by Akarillon

Challenge accepted!

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