rudorathod
IS-IT--Management
I have files coming to the server which are as follows
<<TYPE>>_<<DATE_SENT>>_01-<<DATE_DOWNLOADED>>.txt.gpg
so for example i get two files
TRANSPORT_20071020_01-20071023.txt.gpg and
CALCULATE_20071020_01-20071023.txt.gpg
based on the type i want to move those files to different locations
so if TRANSPORT_20071024_01.txt.gpg it goes to directory
transport/YYYYMM/TRANSPORT_20071024_01.txt.gpg
and if CALCULATE_20071024_01.txt.gpg it goes to directory
calculate/YYYYMM/CALCULATE_20071024_01.txt.gpg
i have the following code but it goes to same location, how can i change it to make the way i want
'/(\w+)_(\d{4})(\d{2})(\d{2})_(\d{2})-\d*\.TXT\.pgp'
=> 'transport/$2$3/$1-$2$3$4_$5.txt.pgp',
<<TYPE>>_<<DATE_SENT>>_01-<<DATE_DOWNLOADED>>.txt.gpg
so for example i get two files
TRANSPORT_20071020_01-20071023.txt.gpg and
CALCULATE_20071020_01-20071023.txt.gpg
based on the type i want to move those files to different locations
so if TRANSPORT_20071024_01.txt.gpg it goes to directory
transport/YYYYMM/TRANSPORT_20071024_01.txt.gpg
and if CALCULATE_20071024_01.txt.gpg it goes to directory
calculate/YYYYMM/CALCULATE_20071024_01.txt.gpg
i have the following code but it goes to same location, how can i change it to make the way i want
'/(\w+)_(\d{4})(\d{2})(\d{2})_(\d{2})-\d*\.TXT\.pgp'
=> 'transport/$2$3/$1-$2$3$4_$5.txt.pgp',