moving multiple folders/files in subversion using bash script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting moving multiple folders/files in subversion using bash script
# 1  
Old 10-31-2008
moving multiple folders/files in subversion using bash script

Hi, I'm new here an dlearning a lot from this forum. i didnt find any solution for this in the forum.
I have already checked in folders in subversion named
HTT01,... HTT21.. and have files in each folder like below:
HTT01/HTT01_00000.hex
HTT01/HTT01_00000_fb_result.hex
HTT01/HTT01_00000_irq_result.hex

i need to rename them all in the subversion.
as
HTTxx folder and files in each folder like below:
HTTxx/HTTxx_00000.hex
HTTxx/HTTxx_00000_fb_result.hex
HTTxx/HTTxx_00000_irq_result.hex

HTTxx_1 folder and files as below
HTTxx_1/HTTxx_00001.hex
HTTxx_1/HTTxx_00001_fb_result.hex
HTTxx_1/HTTxx_00001_irq_result.hex
like this upto HTTxx_20.. and

i can use 'svn mv HTT01 HTTxx_00000', but it will take lot of time to rename each file and folder in subversion fro all 21 folders.. like this i have to do for many sets.. Is there any script available to do this in automated way..?

thanks in advance! Smilie
# 2  
Old 10-31-2008
i found half the way soluton but i need to alter it full to my requirement,,

for d in HTT??; do echo svn mv $d ${d/TT/TTxx_}; done

this will move the directories to the sam enumber but i want the number to be reduced one..

like HTT01 to HTTxx
HTT02 to HTTxx_1,etc..

HTT21 to HTTxx_20
and the internal files also..
how do i do this..?
# 3  
Old 11-12-2008
MySQL foudn solution!

for ((a=1,b=2; a<=3; a++, b++));
do
svn mv HTT0$b HTTxx_$a;
done

this will do what i want .. only for the first folder i need to do it manually.
for two digit need to use it a nd b from that number..and corresponding folder names. Smilie

late response for a question..make the one who ask the question to find the answer..

thanks forum! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Moving files and folders to another folder

I recently bought Synology server and realised it can run scripts. I would need fairly simple script which moves all files and folders from ARCHIVE folder to WORKING folder. I would also need to maintain folder structure as each of the folders may contain subfolders. How would I go about it as I am... (1 Reply)
Discussion started by: ###
1 Replies

2. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies

3. Shell Programming and Scripting

Script for moving series of sub folders

Hello, I'm new to this forum. Did a search but I didn't quite find what I was looking for. This is probably a fairly easy request but I'm just not sure how to accomplish this. I have a folder structure that looks something like this:/names/company1/archive /names/company1/newarchive ... (4 Replies)
Discussion started by: vipertech
4 Replies

4. Shell Programming and Scripting

Script to move files in multiple folders

Hello all, I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders). Thank you (1 Reply)
Discussion started by: mmsiddig
1 Replies

5. Shell Programming and Scripting

Moving files to folders and rename

Hello! I am new to this. I have many files from b_ap00 to b_ap80, and I need to move them to folder 00 to 80 respectively, where b_ap00 is in folder 00, b_ap01 is in folder 01. On top of this, I need to rename the file once they are inside the folder to b_ot, and subsequently run it (ifort -o... (8 Replies)
Discussion started by: krustytherusty
8 Replies

6. Shell Programming and Scripting

Shell Script to delete files within a particular time frame under multiple sub folders

Greetings! I'm looking for starting information for a shell script. Here's my scenario: I have multiple folders(100) for example: /www/test/applications/app1/logs /www/test/applications/app2/logs Within these folders there are log files files that need to be deleted after a month. ... (3 Replies)
Discussion started by: whysolucky
3 Replies

7. Shell Programming and Scripting

moving files from one folder to many folders

I have a more than 10 K files in a folder. They are accumulated in a period of more than an year (Say from 13th July 2010 to 4th June 2011). I need to perform housekeeping on this. The requirement is to create a folder like 13Jul2010,14July2010,......3June2011,4June2010 and then from the main... (2 Replies)
Discussion started by: realspirituals
2 Replies

8. Shell Programming and Scripting

bash script for testing existence of files/folders and creating if neither exist

Hi, I am new to shell-scripting, and doing a lot of reading. I am having some trouble getting started with a simple testing of scripting. I have been experimenting with if, loops, for, test, etc., but still unsure. I seem to have the hang of it when it comes to creating a single file or... (6 Replies)
Discussion started by: me2
6 Replies

9. Shell Programming and Scripting

Moving old files bash script - not working properly

I'm trying to write a script that moves data that's older than 2 weeks to a different place. It works well, EXCEPT, that when the script hits a file within a directory inside the working directory, it will move it to the root of the destination directory instead of putting it in the correct... (1 Reply)
Discussion started by: ugolee
1 Replies

10. Ubuntu

Moving folders with script

Hi All, I am new to Forums, as i am struggling for one script i am launched here. I need to move more than 60,000+ folders in 1,00,000 folders to another server. I have the list of folders which should be moved. can anybody help me in sharing with the script for the above requirement. ... (4 Replies)
Discussion started by: ghimakiran
4 Replies
Login or Register to Ask a Question