Hello all,
I have a single source file that I want to split into multiple target files. The source file will vary and contain the target path and file names. See below for details.
I want to create generic process that will not rely on hardcoded target path and file names. Is this possible?
Thanks in advance for any help
Source File will look like this
/user_path_1/ | file_nname_1.txt/ | Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_1/ | file_nname_1.txt/ | Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_1/ | file_nname_1.txt/ | Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_2/ | file_nname_2.txt/ | Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_2/ | file_nname_2.txt/ | Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_2/ | file_nname_2.txt/ | Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_3/ | file_nname_3.txt/ | Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
/user_path_3/ | file_nname_3.txt/ | Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
/user_path_3/ | file_nname_3.txt/ | Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
The target files will look contain the data like this
/user_path_1/file_nname_1.txt
Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_2/file_nname_2.txt
Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_3/file_nname_3.txt
Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
I have a single source file that I want to split into multiple target files. The source file will vary and contain the target path and file names. See below for details.
I want to create generic process that will not rely on hardcoded target path and file names. Is this possible?
Thanks in advance for any help
Source File will look like this
/user_path_1/ | file_nname_1.txt/ | Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_1/ | file_nname_1.txt/ | Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_1/ | file_nname_1.txt/ | Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_2/ | file_nname_2.txt/ | Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_2/ | file_nname_2.txt/ | Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_2/ | file_nname_2.txt/ | Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_3/ | file_nname_3.txt/ | Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
/user_path_3/ | file_nname_3.txt/ | Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
/user_path_3/ | file_nname_3.txt/ | Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
The target files will look contain the data like this
/user_path_1/file_nname_1.txt
Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
Data1 Data1 Data1 Data1 Data1 Data1 Data1 Data1
/user_path_2/file_nname_2.txt
Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
Data2 Data2 Data2 Data2 Data2 Data2 Data2 Data2
/user_path_3/file_nname_3.txt
Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3
Data3 Data3 Data3 Data3 Data3 Data3 Data3 Data3