
import os, sys

walk_dir = sys.argv[1]

print("walk directory: " + walk_dir)

print("Walk directory (absolute) = " + os.path.abspath(walk_dir))
print("\n\n\n\n\n\n\n\n\n")

for root, subdirs, files in os.walk(walk_dir):
	print(root)
	#list_file_path = os.path.join(root, "dirlist.txt")
	#print("dirlist = ", list_file_path)

	#for subdir in subdirs:
	#	print(subdir)

	for filename in files:
		file_path = os.path.join(root, filename)
		print(file_path + filename)

import os, sys, datetime

#dt = datetime.datetime(1970,1,1).total_seconds()
#	print(dt)

walk_dir = sys.argv[1]

with open("fsscan.scan", "w") as f:

	print("SCANFROM" + walk_dir)

	for root, subdirs, files in os.walk(walk_dir):
		f.write(root + "\n")

	for filename in files:
		file_path = os.path.join(root, filename)
		f.write(file_path + filename + "\n")
Add write dump to file
Add write dump to file

  
- import os, sys
+ import os, sys, datetime
+ 
+ #dt = datetime.datetime(1970,1,1).total_seconds()
+ #	print(dt)
  
  walk_dir = sys.argv[1]
  
- print("walk directory: " + walk_dir)
+ with open("fsscan.scan", "w") as f:
  
+ 	print("SCANFROM" + walk_dir)
- print("Walk directory (absolute) = " + os.path.abspath(walk_dir))
- print("\n\n\n\n\n\n\n\n\n")
  
- for root, subdirs, files in os.walk(walk_dir):
+ 	for root, subdirs, files in os.walk(walk_dir):
+ 		f.write(root + "\n")
- 	print(root)
- 	#list_file_path = os.path.join(root, "dirlist.txt")
- 	#print("dirlist = ", list_file_path)
- 
- 	#for subdir in subdirs:
- 	#	print(subdir)
  
  	for filename in files:
  		file_path = os.path.join(root, filename)
- 		print(file_path + filename)
+ 		f.write(file_path + filename + "\n")
Add write dump to file
## Code Before:

import os, sys

walk_dir = sys.argv[1]

print("walk directory: " + walk_dir)

print("Walk directory (absolute) = " + os.path.abspath(walk_dir))
print("\n\n\n\n\n\n\n\n\n")

for root, subdirs, files in os.walk(walk_dir):
	print(root)
	#list_file_path = os.path.join(root, "dirlist.txt")
	#print("dirlist = ", list_file_path)

	#for subdir in subdirs:
	#	print(subdir)

	for filename in files:
		file_path = os.path.join(root, filename)
		print(file_path + filename)
## Instruction:
Add write dump to file
## Code After:

import os, sys, datetime

#dt = datetime.datetime(1970,1,1).total_seconds()
#	print(dt)

walk_dir = sys.argv[1]

with open("fsscan.scan", "w") as f:

	print("SCANFROM" + walk_dir)

	for root, subdirs, files in os.walk(walk_dir):
		f.write(root + "\n")

	for filename in files:
		file_path = os.path.join(root, filename)
		f.write(file_path + filename + "\n")