Hello,
Currently working on this problem, I think I'll be able to get through most of it, but have 2 main questions:
1. Is it possible to extract data from text files, if I don't know the text file names?
(Script will work with text files in the working directory, but the text files will always have random and different names when they are run. Not sure how I would reference them to pull out data).
2. Would the best approach to my problem be to create an array from the .txt data, to search through all the barcodes, and once a barcode is found, subtract "1" from the "Shipped" (quantity) of that barcode array entry, and keep searching through that record until "Shipped" quantity reaches "0"?
(Note: It doesn't matter in which order a 'barcode' is assigned to which 'Ship To' pile it'll go to, as long as each 'barcode' is assigned to one)
--------
Sample files I'll be working with (.txt input files):
Shipment Plan 1
Shipment Plan 2
Shipment Plan 3
Shipment Plan 4
--------
Here are some workflow diagrams that demonstrate what exactly I'm trying to do:
Picture of "Shipping Plan" .txt file data (with relevant data in Bold):
Any help would be greatly appreciated! Still pretty new to arrays so just trying to rack my brain on how to tackle this problem
Currently working on this problem, I think I'll be able to get through most of it, but have 2 main questions:
1. Is it possible to extract data from text files, if I don't know the text file names?
(Script will work with text files in the working directory, but the text files will always have random and different names when they are run. Not sure how I would reference them to pull out data).
2. Would the best approach to my problem be to create an array from the .txt data, to search through all the barcodes, and once a barcode is found, subtract "1" from the "Shipped" (quantity) of that barcode array entry, and keep searching through that record until "Shipped" quantity reaches "0"?
(Note: It doesn't matter in which order a 'barcode' is assigned to which 'Ship To' pile it'll go to, as long as each 'barcode' is assigned to one)
--------
Sample files I'll be working with (.txt input files):
Shipment Plan 1
Shipment Plan 2
Shipment Plan 3
Shipment Plan 4
--------
Here are some workflow diagrams that demonstrate what exactly I'm trying to do:
Picture of "Shipping Plan" .txt file data (with relevant data in Bold):
Any help would be greatly appreciated! Still pretty new to arrays so just trying to rack my brain on how to tackle this problem