Driveskull Posted July 30, 2016 Posted July 30, 2016 (edited) So i want to create multiline files : It should look like this as end effect ( each saved as separate file with the same name) { "Type": "pyi", "Google": null, "Token": null, "Google": null, "Ptc": "info pasted here from txt file first part of the line safasfasf:asafasfafas", "Ptcpo": "the other part of the line" } How to do that? Edited July 30, 2016 by Driveskull
iamtheky Posted July 30, 2016 Posted July 30, 2016 omgwut? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
kcvinu Posted July 30, 2016 Posted July 30, 2016 Read text file with _FileReadToArray function. It will read all text in a file and return an array contains each line of that file content. Then use DirCreate function inside a loop to create 20 folders. After that create a master folder and copy all the 20 folders to it. Use DirCopy function for it. I can't understand rest of your question. Can you please elaborate once ? Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Driveskull Posted July 30, 2016 Author Posted July 30, 2016 Just now, kcvinu said: Read text file with _FileReadToArray function. It will read all text in a file and return an array contains each line of that file content. Then use DirCreate function inside a loop to create 20 folders. After that create a master folder and copy all the 20 folders to it. Use DirCopy function for it. I can't understand rest of your question. Can you please elaborate once ? I changed this ( the first part with creating folders is simple with cmd commands) But how to create new file named : something.json and looking like this : { "Type": "pyi", "Google": null, "Token": null, "Google": null, "Ptc": "info pasted here from txt file first part of the line safasfasf:asafasfafas", "Ptcpo": "the other part of the line" } with data from txt file with lines : afgasfasfasf:asdfasfdasfas First part of the line should go into PTC the other into PTCPO
kcvinu Posted July 30, 2016 Posted July 30, 2016 So you want to enter 2 piece of data into that file. For PTC and for PTCPO. Right ? Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Driveskull Posted July 30, 2016 Author Posted July 30, 2016 1 minute ago, kcvinu said: So you want to enter 2 piece of data into that file. For PTC and for PTCPO. Right ? I want to create this file first ( or create copy of it ) and then file PTC and PTCPO with data from different txt file
kcvinu Posted July 30, 2016 Posted July 30, 2016 Ok, create it with FileWrite function. Then read the data from desired file with FileRead function. It will return a string. You can use StringSplit function to split it for PTC and for PTCPO. Then write the splitted content with FileWrite function. That's all. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Driveskull Posted July 30, 2016 Author Posted July 30, 2016 2 minutes ago, kcvinu said: Ok, create it with FileWrite function. Then read the data from desired file with FileRead function. It will return a string. You can use StringSplit function to split it for PTC and for PTCPO. Then write the splitted content with FileWrite function. That's all. Ok thats clears everything a bit. But still we need to create/ or copy file where the data need to be written
kcvinu Posted July 30, 2016 Posted July 30, 2016 If you know tha path of the file, then you can use FileCopy function. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Driveskull Posted July 30, 2016 Author Posted July 30, 2016 (edited) 2 hours ago, kcvinu said: If you know tha path of the file, then you can use FileCopy function. Do you have maybe any easy examples of those functions? in wiki its a bit hard to understand how to use those 5 functions at the same time Edited July 30, 2016 by Driveskull
kcvinu Posted July 31, 2016 Posted July 31, 2016 (edited) All example code in help file is sufficient to learn. Read it and ask any specific dout here. I can help you. Try one by one. Edited July 31, 2016 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
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