Jump to content

@computername


Recommended Posts

HELLO

IS IT POSSIBLE TO GET @COMPUTERNAME VALUE IN THE NAME OF A FILE using _FileCreate?

example :

if the @computername value is 5p0105, create a file c:\windows\5p0105.txt

regards

thanks for your help and advises

Link to comment
Share on other sites

  • Moderators

HELLO

IS IT POSSIBLE TO GET @COMPUTERNAME VALUE IN THE NAME OF A FILE using _FileCreate?

example :

if the @computername value is 5p0105, create a file c:\windows\5p0105.txt

regards

thanks for your help and advises

$FOpen = FileOpen(@WindowsDir & '\' & @ComputerName & '.txt', 10)
FileClose($FOpen)

Edit:

After looking at mine, I had 8 to create the directory, but you need 1 or 2 as Jdeb shows below to write (to create it).

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Developers

HELLO

IS IT POSSIBLE TO GET @COMPUTERNAME VALUE IN THE NAME OF A FILE using _FileCreate?

example :

if the @computername value is 5p0105, create a file c:\windows\5p0105.txt

regards

thanks for your help and advises

Yes.... did you try it ?

FileWriteLine(@Computername & ".txt", " text.......")

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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