Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Input a Text/No. and the look for a particular file
#1
Hey All, I am a new user and would like to seek your assistance in this.

My program will prompt user to enter the Week Number like the one below;

str t
inp- t "Enter the week number"


After entering a number (Eg. "X")
The program is required to go to D drive to open a notepad file "DataWkX.txt" (Eg. If user has enter "3" initially, then the filename would be DataWk3.txt). The filename DataWk would be fixed, only the digit after would vary. I tried to program like the one below but failed to get the result.

run "D:\DataWK%s.txt" t

Thanks in advance.
#2
str s
s.format("D:\DataWK%s.txt" t)
run s


Forum Jump:


Users browsing this thread: 1 Guest(s)