We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
file re-organisation conundrum
badgerino
Posts: 69 Forumite
in Techie Stuff
Hello
I have a text file containing the full paths of a list of around 1000 files on my PC. They are scattered around the My documents folder.
I want to take all the files in the text file and copy them into one, single, new directory. It would take over 5 hours to drag and drop each one individually.
Anyone know an application that can do this?
I've tried a dos batch file but the filenames contain spaces so dos doesn't find them :eek:
Cheers :beer:
I have a text file containing the full paths of a list of around 1000 files on my PC. They are scattered around the My documents folder.
I want to take all the files in the text file and copy them into one, single, new directory. It would take over 5 hours to drag and drop each one individually.
Anyone know an application that can do this?
I've tried a dos batch file but the filenames contain spaces so dos doesn't find them :eek:
Cheers :beer:
its pretty hard to drown a goldfish.
0
Comments
-
draw aline around them all with your mouse and click send to.
I think that might work, or holding the left click on the mouse draw around them and drag the lot at the time and place them in that way, so you are dragging and dropping but the whole thing.
cw
Pls be nice to all MSer's
There's no such thing as a stupid question, and even if you disagree courtesy helps.
Tomorrow never come's as today is yesterday and tomorrow is today
MERRY CHRISTMAS FELLOW MSer's:xmastree:0 -
Not sure what you mean.
Create a new folder. Click on the first and then do Ctrl + A. Keep your finger on Ctrl and then click on all the files that you do not want included within the folder or drag the whole lot over and then delete the ones that you do not want.0 -
Thanks for replying but, sorry, I think you may have misunderstood - the files I want to transfer are not all in one place, so I can't draw a line around all of them. I do however have a list of all the full file paths written in a text file.
Any other suggestions?its pretty hard to drown a goldfish.0 -
put "" around the filenames to do it in a batch fileEver get the feeling you are wasting your time? :rolleyes:0
-
Hmmm I think I see what you mean. So you have a txt file that stores the location of around 1,000 files on your system.
And using the locations in the txt file, you want to grab the associated file and move it somewhere.
Don't know an easy solution but could right a .Net app in a matter of 5-10mins. Let me have a quick look. If I get a chance to quickly write something I'll post back."Boonowa tweepi, ha, ha."0 -
This batch file is what you are looking for:
http://www.demarzo.net/archive/2004/03/30/using-for-command-to-copy-files.aspx
It will take a little tweaking to change the file paths but basically it is okay.
Reading the text it mentions it will keep the same folder structure in the destination. You would have to look at the switches included and remove the one keeping the folder path.
The Example given includes spaces in the filenames so its worth a go (and free!!)0 -
Thanks guys - using the " in the batch file seems to be doing the trick.
But it was very nice of you to offer to write the application - appreciate the guesture.its pretty hard to drown a goldfish.0 -
Ah well, a cheap and dirty .Net version
StreamReader reader = new StreamReader(@"C:\Files.txt"); Directory.CreateDirectory(@"C:\Output"); string line; while(!string.IsNullOrEmpty(line = reader.ReadLine())) !! if (File.Exists(line)) !! FileInfo file = new FileInfo(line); file.CopyTo(string.Format(@"C:\Output\!!0}", file.Name)); } }
The batch file is the best way though. Easy and it works."Boonowa tweepi, ha, ha."0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.5K Banking & Borrowing
- 253.7K Reduce Debt & Boost Income
- 454.5K Spending & Discounts
- 245.5K Work, Benefits & Business
- 601.5K Mortgages, Homes & Bills
- 177.6K Life & Family
- 259.5K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards