lookinano.blogg.se

Deepvacuum not grabbing subdirectories
Deepvacuum not grabbing subdirectories













deepvacuum not grabbing subdirectories

Headers_cmd = 'sed -i.bak 1i"Permissions,Links,Owner,Group,Size,ModifiedTime,FilePath" ' + outputFileĭepending on how much data you get back, you can massage it further using Pandas.

deepvacuum not grabbing subdirectories deepvacuum not grabbing subdirectories

The resulting CSV file doesn't have a header row, but you can use a second command to add them. That command produces comma separated values that can be easily analyzed in Excel. # Find the requested data and export to CSV, specifying a pattern if needed.įind_cmd = 'find ' + location + ' -name ' + pattern + ' -fprintf ' + outputFile + ' "%Y%M,%n,%u,%g,%s,%A+,%P\n"' OutputFile = rootDir + '_directory_contents.csv' Pattern = '*.py' # Use this if you want to only return certain filetypes # Global variables for directory being mapped Pretty simple solution would be to run a couple of sub process calls to export the files into CSV format: import subprocess

deepvacuum not grabbing subdirectories

So as you can see for yourself, the listdir version is much more efficient. Print("Time taken: %.2fs"%(time.time()-start)) # 0.42sįor i in range(100): files = listFiles4("src") # walk and join Print("Time taken: %.2fs"%(time.time()-start)) # 0.28sįor i in range(100): files = listFiles2("src") # listdir and join I tried just capturing a web archive of the page, but it won’t play the movie files unless I’m connected to the internet so that didn’t work, either.Since every example here is just using walk (with join), i'd like to show a nice example and comparison with listdir: import os, timeįolder = walk.pop(0)+"/" items = os.listdir(folder) # items = folders + filesįor i in items: i=folder+i (walk if os.path.isdir(i) else allFiles).append(i)ĭef listFiles2(root): # listdir/join (takes ~1.4x as long) (and uses '\\' instead)įolder = walk.pop(0) items = os.listdir(folder) # items = folders + filesįor i in items: i=os.path.join(folder,i) (walk if os.path.isdir(i) else allFiles).append(i)ĭef listFiles3(root): # walk (takes ~1.5x as long)įor folder, folders, files in os.walk(root):įor file in files: allFiles+= # folder+"\\"+file still ~1.5xĭef listFiles4(root): # walk/join (takes ~1.6x as long) (and uses '\\' instead)įor file in files: allFiles+=įor i in range(100): files = listFiles1("src") # warm upįor i in range(100): files = listFiles1("src") # listdir I’m guessing the page I want to capture probably has close to 500 meg of data, so I know this option didn’t get what I want to get. I see a menu item called “File/Import Site” but when I tried using that, it only downloaded less than 300k worth of data and I don’t even know what it did with that. I’d love to just enter that URL and then have the app capture all of it so I could just view that page whether that page was still active or not. On the one page she created for our company it has for each lesson the movie file, the powerpoint file, the Word document with our homework and notes and other miscellaneous data. I’d like to archive it so I can watch it whenever, whether tomorrow or 5 years from now. So now I’m concerned that as soon as that page goes away, we’ll lose access to this information. mov format so we could just download them for offline storage, but that didn’t happen. She was initially using a cumbersome site/format called iLinc, but because so many people had trouble accessing it she put the movie files into Acrobat format. Each class we’d call in and she’d essentially create a movie file of her desktop that we could see as she’d either play a powerpoint file for us or show herself using some of the tools we’d be discussing. She did a great series of 8 different ‘classes’. Our company hired a marketing consultant to do some customized teaching for us on social media marketing. I’ve got DTPO but I’m not sure if it can do this.















Deepvacuum not grabbing subdirectories