anybastard Posted September 15, 2011 Share Posted September 15, 2011 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 More sharing options...
Akarillon Posted September 15, 2011 Share Posted September 15, 2011 (edited) 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 September 15, 2011 by Akarillon Challenge accepted! Link to comment Share on other sites More sharing options...
anybastard Posted September 15, 2011 Author Share Posted September 15, 2011 Hi , thanks so much for your quick answer . does this work ? -> No it is only an example to explain my problem Your first example works fine . I wasn;t good with single quote Best Regards AnyB. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now