Geert Posted November 12, 2005 Share Posted November 12, 2005 I wrote a script with a simple filename-counter in it. In the output I will add this counter as a prefix for the filename: 1 shell32.dll 2 system.ini 3 explorer.exe ... I would like to have the numbers in four digits: 0001 shell32.dll 0002 system.ini 0003 explorer.exe 0256 test.txt ... I would like to use StringFormat but I don't know how to specify the 'format control' of the StringFormat command. Link to comment Share on other sites More sharing options...
SumTingWong Posted November 12, 2005 Share Posted November 12, 2005 (edited) I wrote a script with a simple filename-counter in it. In the output I will add this counter as a prefix for the filename:1 shell32.dll2 system.ini3 explorer.exe...I would like to have the numbers in four digits:0001 shell32.dll0002 system.ini0003 explorer.exe0256 test.txt...I would like to use StringFormat but I don't know how to specify the 'format control' of the StringFormat command. $sFormattedFileName = StringFormat("%04d %s", $nCounter, $sFileName) Edited November 12, 2005 by SumTingWong Link to comment Share on other sites More sharing options...
Geert Posted November 13, 2005 Author Share Posted November 13, 2005 Thanks, that's what I needed! 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