comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Tips for IDL-istic file transfer...? Please help me.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Tips for IDL-istic file transfer...? Please help me. [message #70899 is a reply to message #70845] Wed, 12 May 2010 14:00 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Harry Kim wrote:
> Hi, all! I need your help. I have about 3200 folders. Each folder has
> 2 or 8 files in there.
>
> I am trying to move files in those folders into one folder.
>
> the folder's names are as follows.
>
> '2000.01.01', '2000.01.02', '2000.01.03'... ,'2008.12.31'.
>
> I want to move the files in these folders into one file named
> '2000-2008'.
>
> After I have been repeating to open one folder, to cut files, and to
> copy them into one folder for 15 minutes manually, I feel very stupid.
> I think there must be some way in IDL, but I cannot figure out what to
> do.
>
> Can someone get me out of this stupidity? Please let me know an IDL-
> istic solution for this problem.

The question's been answered, but IDL isn't the ideal (pun intended :o) tool here... IMO
at least. What about:

#!/bin/sh
old_dirs=`ls -d 20??.*`
new_dir="2000-2008"
test -d ${new_dir} || mkdir ${new_dir}
for dir in ${old_dirs}; do
mv ${dir}/* ${new_dir}
done

in regular old shell??

Disregard if you're a windows user of course....

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Landsat HDF
Next Topic: pixelwise regression for time series images

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:33:27 PDT 2025

Total time taken to generate the page: 1.03634 seconds