Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting a number out of a file name and creating a new file

Status
Not open for further replies.

madhusd

IS-IT--Management
Aug 13, 2001
74
Is there a script that can do the following ?

Capture all files of a specific type in a specific folder and create a text file with the following info...

vfx -n 9724582499 -d faxmodem 1_9724582499.doc
vfx -n 9725101119 -d faxmodem 2_9725101119.doc
vfx -n 9722461109 -d faxmodem 3_9722461109.doc
vfx -n 8173451099 -d faxmodem 4_8173451099.doc
vfx -n 9726066666 -d faxmodem 5_9726066666.doc
vfx -n 9723357640 -d faxmodem 6_9723357640.doc
vfx -n 8172833175 -d faxmodem 7_8173451099.doc
vfx -n 9725424386 -d faxmodem 8_9725424386.doc
vfx -n 2142217688 -d faxmodem 9_2142217688.doc

Pay attention to the 3rd and the last columns. All files in a particular folder are in the format of 1_9724582499.doc..... etc.

I want to create a txt or csv file to extract the number from the name of the text file and put it in a seperate column and the corresponding file name in another column.

Is there a VB script or any kinda script that can do this ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top