how to create text files with a specific name
harshal963
![]()
- Joined: Dec 26, 2010
- Posts: 7
hi! how can i do the following task?
1. ask the user how many text files he want to create?(suppose user enters 20)
2. then 20 txt files should be created with the following names: 1.txt,2.txt ..... till 20.txt
(all the files need to be empty)
And now after these 20 files are created then i run a loop from 1 to 20 and update each file with some different content that is stored in the variables based on loopindex.
t-hex
![]()
- Joined: Nov 13, 2011
- Posts: 152
Hope this helps :)
Job file attached: WA Console > File > Import Job > Select *.waj file NOTE: WA write action always adds/appends carriage return and line feed while writing to a file :( CR => 0x0D => \r LF => 0x0A => \n Thus can't create a null file (0 byte file) :( Workaround: (Use dos command instead) e.g.: copy NUL "C:\1.txt"
harshal963
![]()
- Joined: Dec 26, 2010
- Posts: 7
Yes, it works!!
Login to post a reply Not a member yet? Register