Dion07 Posted January 17, 2020 Share Posted January 17, 2020 What I am trying to do sounds simple, but I am not certain how to accomplish this. I am needing to grab the file version of an EXE on my network, then make a new folder named as said file version in another directory. I am using the following (based on what I have found in these forums) for getting the File Version, which works and displays it in a pop up. MsgBox(0,'', FileGetVersion("\\path\file.exe")) How would I change this, so that instead of displaying this File Version, it instead copys it to the clipboard so that I may then create said folder and move forward with the rest of my script. Link to comment Share on other sites More sharing options...
Marc Posted January 17, 2020 Share Posted January 17, 2020 ClipPut(FileGetVersion("\\path\file.exe")) Dion07 and markyrocks 1 1 Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
Elevenster_Loading Posted January 17, 2020 Share Posted January 17, 2020 Local $File_Version = FileGetVersion("file.exe") Hello there, i think you should start by putting that file version in a variable so you can use it later to create your folder Dion07 1 Link to comment Share on other sites More sharing options...
Dion07 Posted January 17, 2020 Author Share Posted January 17, 2020 3 minutes ago, Marc said: ClipPut(FileGetVersion("\\path\file.exe")) Well now that was just too easy 😁 Elevenster_Loading 1 Link to comment Share on other sites More sharing options...
Nine Posted January 17, 2020 Share Posted January 17, 2020 Or maybe this ? Local $sVersion = FileGetVersion("\\path\file.exe") If Not DirCreate (".\" & $sVersion) Then Exit MsgBox (0,"Error","Unable to create folder") Dion07 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Dion07 Posted January 17, 2020 Author Share Posted January 17, 2020 2 minutes ago, Nine said: Or maybe this ? Local $sVersion = FileGetVersion("\\path\file.exe") If Not DirCreate (".\" & $sVersion) Then Exit MsgBox (0,"Error","Unable to create folder") What does the second line do exactly? If that is simply making a new folder, would I set the directory like so? Local $sVersion = FileGetVersion("\\path\file.exe") If Not DirCreate ("C:\Somewhere\" & $sVersion) Then Exit MsgBox (0,"Error","Unable to create folder") Link to comment Share on other sites More sharing options...
Elevenster_Loading Posted January 17, 2020 Share Posted January 17, 2020 @Dion07 Yes, just tried it. it works ^.^ Dion07 1 Link to comment Share on other sites More sharing options...
Dion07 Posted January 17, 2020 Author Share Posted January 17, 2020 Thank you guys. You've been a great help. 😁 Elevenster_Loading 1 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