Flux ropes are frequently observed in the space plasmas, such as solar wind, planetary magnetosphere and magnetosheath etc., and play an important role in the reconnection process and mass and flux transportation. One usually uses bipolar signature and strong core field to identify the flux ropes. We propose here one new method to identify flux ropes based on the correlations between the variables of the data from in situ spacecraft observations and the "target function to be correlated" (TFC) from the ideal flux rope model. Through comparing the correlation coefficients of different variables at different times and scales, and performing weighted-average techniques, this method can derive the scales and locations of the flux ropes. We compare it with other methods and also discuss the limitation of our method.