gulp how to use copied files in the destination folder in the same task - gulp

With Gulp 4, i have a task to copy an original file atleast 3 times and then modify each new file, while keeping the original file intact.
How to achieve the following steps:
select json file through src
copy json file through dest
select the destination json file since the file name is the same
make changes in the new json file
repeat 1-4 on another loop

Related

how to use delimeter= , for cleaning the csv file data

I am new to python.
I have one zipped folder. First I need to extract the CSV files in a new folder and then read all data and merge the data into one new file.
I successfully unzip the folder and was able to read the data from all files.
However, I am stuck with the data cleaning operations.
I am getting data in col A and need to split the data by using delimiter = “,”
Can someone advise about that? Please
[code][1]

Move files to folders based on value in .csv file using .bat file

I need to move .jpg images from one folder to another using listing from CSV which changes periodically.
I need to move .jpg images from one folder into sub folders based on a value in a CSV file which periodically changes.
For example I have a folder called D:\photos which folder contains numbered sub folders i.e.
D:\photos\1000
D:\photos\1001
D:\photos\1002
Now in my folder D:\photos There are three files named a.jpg, b.jpb, c.jpb where the output.csv looks like following
Output
1001
So as per CSV I have to move mention above files into d:\photos1001 which will be removed form actually folder.
Next in my folder D:\photos there are 3 files. a.jpg, b.jpg and c.jpg
and output.csv contains following information.
Output
1002
In this case I need to move the files a.jpg, b.jpg and c.jpg into D:\photos1002 then delete the files from D:\photos
Or another way I can change files in 1002_a.jpg format too in the D:\photosfolder.
Can anyone help me out with creating a .bat file that does this?
Move all .csv file from one folder to another folder
#echo off
move E:\folder_from*csv*.* E:\folder_to

How to delete a file (deep) in a ZIP folder in Python?

I'm writing a script that is extracting 2 JSON files from deep (3 folders down) in a ZIP Folder, modifying its contents, and writing those files back into that same folder. The only issue is that when I write the JSON Files back into the folder where they were initially pulled from, they do not overwrite so now I have 4 files named (product, product, package, package). I wish to delete or overwrite the non-modified files but don't know how.
I have looked up how to do it on other threads and it says it's not supported but I was hoping by now someone had addressed this without having to do the "rewrite the entire directory minus the old files into a new ZIP" routine. I've also tried writing to the zip file with 'w' mode but that just deletes the whole other contents of the zip file.
This is how I'm writing each file back into the ZIP file
zf = zipfile.ZipFile(ZipName, 'a')
zf.write('package.json',addressBook[0],compress_type = zipfile.ZIP_DEFLATED
zf.write('product.json',addressBook[1],compress_type = zipfile.ZIP_DEFLATED

SSIS to get the particular file from multiple files and copy to different folder

my question is how we will create SSIS package to get the particular file from multiple files and copy to different folder
Need Help
You can use File System Task in your package control flow.
Configure the properties as below:
DestinationConnection: Enter the full file path of the folder you want to move your file to e.g c:\Users\ToTest
Operation: Change to Move file.
SourceConnection: Enter the full file path of the folder where your file is, including the file name and extension e.g c:\Users\Test\testfile.csv
You'll need at least two components.
Use a Foreach Loop container with the default Foreach File Enumerator on the Collection tab. Set Folder: to \YourFolder and build an expression under Files: to identify the particular file you're interested in.
Inside the Foreach Loop container, add a File System Task to Copy the file from the Source folder to the Destination folder.

Add headers to multiple text files SSIS

I have a process that I want to create in SSIS. What I have so far is below.
So the scenario is that a number of different file types are downloaded to a specific location - which has been created as a variable "RootFolder"
Within that RootFolder, is a folder called "Archive"
The first part of the process is to create a folder within the variable of ArchiveFolder, which is basically todays date.
Then in a For Loop Container, it copies all the files in the RootFolder to the Archive Folder. So we have a history of the files received.
The next step that I want to carry out in SSIS is to add a header line at the top of each of those text files. So all the files that still exist in the Root Folder get a header added to the top of the file. Is there something direct in SSIS to do this, or would I need a .bat file to do it and have an Execute Process Task, to call that bat file. Either way I have no idea how to achieve this bit. Your help will be appreciated.