Problem writing/wrapping files under folder using perl
I have a script which generates env setup xml file by reading path.It read the path and checks if there is any file/dir present recurseively.
If a file is found under sub directory then it will read the file and the values from the file are passed to generate xml format.
Problem is if i have a file in sub directory, then in xml format, these file information should come under sub directory name but current script
write all the file information under only main sub directory level2.
Ex :
Path : C:\SD\Setup\Data
In the above path, there will sub dir level1 : UAINI
C:\SD\Setup\Data\UAINI\
under this level1, there will another level2 of sub dir : Base
C:\SD\Setup\Data\UAINI\Base
under this level2, there will 3 sub dir's level3 :
each of these sub dir's will have 1 or more files
file content will be:
now after running the main script,i get the xml format with the content under Base dir as container(level2). Instead, should get xml format
with having 3 containers and each container having sub dir's level3 name and it's file content.
now getting output as :
Attached png file to show how current output looks like.
Instead am trying to get like this : please note i added container tag manually here to get each sub dir's level3 dir name/wrapper.
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Hello Smart People!
I have a perl script that will import xml data into an access db.
I would like to modify it so it will automatcially parse through all xml files in the folder. I swa a post but couldnt get it working. her is what my scrip looks like, i only list the top if you need more... (3 Replies)
Hi All
I am stuck in a problem and wants help
What i want to do is I have a directory(say name of that directory is outdir) In that directory(outdir) the files come after some gap of time by some processes.
What i want to do is i want to list all the files in that directory after the given... (2 Replies)
Hi all,
cp -r /tmp/Agent/* /apps/opt/Agent/TEST
When I copy files under /tmp/Agent using this command Files are getting copied to Agent folder also but I need only in the TEST folder.
Is there any way to fix this issue??\
Thanks in advance
Ananth (4 Replies)
I want to write a Perl script that manipulates multiple files. In the directory, I have files 250.*chr$.ped where * is from 1 to 1000 and $ is from 1-22 for a total of 22 x 10,000 = 22,000 files.
I want to write a script that only manipulates files 250.1chr*.ped where * is from 1 to 22.... (10 Replies)
Hello,
I've got a process failure which says it may be caused by insufficient space in the directory. Is there a way I can tell what the maximum allowable size is?
I've done df -k and there are no file systems over 45% so if it is a space problem it's confined to the sub directory. (4 Replies)
Hello:
I have the following code:
----------------------------------
open (OUTPUT_FILE, ">>/usr/users/rovolis/PREPAID/CC/TCG/PP.$cyear$cmonth$cday.txt")||die "$!";
82 open (OUTPUT_FILE2, ">>/usr/users/rovolis/PREPAID/CC/TCG/PR.$cyear$cmonth$cday.txt")||die "$!";
83 # ... (0 Replies)
Hello all,
I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written.
I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
I am fairly new at this,
I wrote a awk program to give me some summary information about a file. At the end of the program I want to print some variables but for some reason it keeps wrapping the last variable on a new line in the output file.
Here is the print command
print "99", file_id,... (1 Reply)