Search large folders, copy found files, paste to new folder?
Moderator: DosItHelp
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: Search large folders, copy found files, paste to new fol
Hey aacini, yes I have been using Foxidrives .bats as I have managed to get them working really well. I am not very sharp with this kind of work and it takes me quite a while to learn how to apply the scripts. I think the ones you have sent me I have failed to get working, as I didn't completely understand how to apply them. I am concerned that if I put time into your scripts as well I will get confused.
That being said, I have written text docs to remind myself how to use foxi's scripts, so I could probably have a crack at your new one.
I do remember an earlier one you designed, it included an ability to return the path to a given file? this is something I'm trying to figure out now, ill hunt through your older scripts to find this as well.
Foxi, the trouble I was having was the computer acting sluggishly. Its always been smooth, and last week it could only handle 1 batch script at a time, and would have problems and stop completely if I tried opening excel or firefox. I think this is just me getting used to windows, it seems to have more background operations happening at unpredictable times compared to my mac. (no probs, its just me catching up on how windows works)
That being said, I have written text docs to remind myself how to use foxi's scripts, so I could probably have a crack at your new one.
I do remember an earlier one you designed, it included an ability to return the path to a given file? this is something I'm trying to figure out now, ill hunt through your older scripts to find this as well.
Foxi, the trouble I was having was the computer acting sluggishly. Its always been smooth, and last week it could only handle 1 batch script at a time, and would have problems and stop completely if I tried opening excel or firefox. I think this is just me getting used to windows, it seems to have more background operations happening at unpredictable times compared to my mac. (no probs, its just me catching up on how windows works)
Re: Search large folders, copy found files, paste to new fol
My program don't require anything new, just the same list.txt file. Just a little advice: it is probable that my solution takes a fraction of the time needed to locate the files. Of course, the time needed to copy the files is the same in both programs...
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: Search large folders, copy found files, paste to new fol
Aacini it is true, your program is very very fast! However it is not finding files from the Root folder.
I have some test files I am searching for, which are 6 folders deep. It cannot find them.
It can only find them if the files are 2 folders deep.
I have some test files I am searching for, which are 6 folders deep. It cannot find them.
It can only find them if the files are 2 folders deep.
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: Search large folders, copy found files, paste to new fol
Huh.. i just came across a problem where the file names of the tracks are in many cases too long for windows to transfer them successfully. I hadn't had that error at all, until i made 50 compilations in a week (thanks to this great tool foxi!) and about 15 of them included files that windows simply did not transfer to our network hard drive.
I am wondering if there is a way for the rename function to watch for file names which are above say, 30 characters, and to cut off the extra characters at the start to bring it down to 29, including the current rename function adding 3 digits at the start.
Should I start a new thread for this?
I am wondering if there is a way for the rename function to watch for file names which are above say, 30 characters, and to cut off the extra characters at the start to bring it down to 29, including the current rename function adding 3 digits at the start.
Should I start a new thread for this?
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: Search large folders, copy found files, paste to new fol
I think ill just find a file renamer utility and add it as a new step in my process
Re: Search large folders, copy found files, paste to new fol
Are you copying to the root folder of a drive?
The problem includes all the path characters so if you are copying to say
c:\users\rumpilstiltskin and company\desktop\holding folder for compilation 254367890\
then all those characters in the folders pathname are being taken away from what could be used in the path\filename, before exceeding the maximum length.
So if that is the case then copying to c:\disktemp01
would alleviate the issue somewhat.
Would that help in your case?
The problem includes all the path characters so if you are copying to say
c:\users\rumpilstiltskin and company\desktop\holding folder for compilation 254367890\
then all those characters in the folders pathname are being taken away from what could be used in the path\filename, before exceeding the maximum length.
So if that is the case then copying to c:\disktemp01
would alleviate the issue somewhat.
Would that help in your case?
Re: Search large folders, copy found files, paste to new fol
I'm not sure but maybe you can use the short file names for that directory
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: Search large folders, copy found files, paste to new fol
woops i must have missed the notifications for the above 2 replies, I ended up just using a file renamer, its fine like that.
One thing I have started noticing though is that the hard disk that my desk top is on has only around 100gb free
Foxi when I use the tool you made for me, sometimes I am copying more than 100gb of files to help me organise things better. (its such a great tool! I use it most weeks)
Is there a way it can be edited to place the 'copied files' folder that it creates; onto my empty D drive instead of the desktop on C? Ill re attach the script to show where its at.
I have tried a few times to edit it myself but I keep getting error messages when i run it.
One thing I have started noticing though is that the hard disk that my desk top is on has only around 100gb free
Foxi when I use the tool you made for me, sometimes I am copying more than 100gb of files to help me organise things better. (its such a great tool! I use it most weeks)
Is there a way it can be edited to place the 'copied files' folder that it creates; onto my empty D drive instead of the desktop on C? Ill re attach the script to show where its at.
I have tried a few times to edit it myself but I keep getting error messages when i run it.
Code: Select all
@echo off
set "list=list.txt"
setlocal EnableExtensions EnableDelayedExpansion
dir /a:-d /o:n /b /s >filelist.tmp
del list2.tmp 2>nul
del notfound.txt 2>nul
set c=0
for /f "delims=" %%a in ('type "%list%"') do echo finding "%%a"& findstr /r /i /c:"\\\%%a$" filelist.tmp >>list2.tmp || >>notfound.txt echo %%a
md "%userprofile%\desktop\copied files" 2>nul
set "name="
for /f "delims=" %%a in ('type "list2.tmp"') do (
if /i not "%%~nxa"=="!name!" (
echo copying "%%~nxa"
copy /b "%%a" "%userprofile%\desktop\copied files\" >nul
)
set "name=%%~nxa"
)
del filelist.tmp 2>nul
del list2.tmp 2>nul
echo.
if exist notfound.txt echo Check NOTFOUND.TXT for filenames that were missing
echo.
echo done
echo.
pause
Re: Search large folders, copy found files, paste to new fol
Here are the two changed lines. I think that's it.
Bobbo Jones wrote:
md "d:\copied files" 2>nul
set "name="
for /f "delims=" %%a in ('type "list2.tmp"') do (
if /i not "%%~nxa"=="!name!" (
echo copying "%%~nxa"
copy /b "%%a" "d:\copied files\" >nul
)
set "name=%%~nxa"
)
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: Search large folders, copy found files, paste to new fol
I just wanted to jump in here and Thank both Aacini and Foxidrive, I use both of the tools you have created me on a regular basis. Foxi's I use to search through our entire network, to create a mass folder/dumping ground for all the files I will need in the future. Its accurate for this. Aacinis I use to search my mass folder for the specific files I need. Its very fast for this!
thanks again
thanks again