Main Area and Open Discussion > General Software Discussion
Recreate files but without content to target drive
Biffle:
Can Zero Zipper do this "Recreate files but without content to target drive" without zipping the files, but just create them in the target (so one would not to have to unzip them each time)?
vixay:
You could replace the commands to add the file to zip in the python script (see below) with your own python commands to create the file in the destination folder?
Replace these lines
--- ---zfAddNullFile(zf, f, (mtime.tm_year, mtime.tm_mon, mtime.tm_mday, mtime.tm_hour, mtime.tm_min, mtime.tm_sec))
zfAddNullFile(zf, dp, (mtime.tm_year, mtime.tm_mon, mtime.tm_mday, mtime.tm_hour, mtime.tm_min, mtime.tm_sec), 16)
with where you prepend your destination to both f & dp. e.g. f = target + f
--- ---open(f, "a").close()
os.mkdir(dp)Though you would have to google on setting the timestamps accurately. see here and here
or use zerozipper by skwire and choose your temp directory to be the destination where you want the structure, but to prevent deletion you would have to ask skwire for the changes or the code
Biffle:
Thank you, vixay,
Looks complicated. Hmmm, where could I find this python script?
Many thanks again
4wd:
Looks complicated. Hmmm, where could I find this python script?-Biffle (August 16, 2016, 05:40 AM)
--- End quote ---
Just use RoboCopy (included with Windows):
robocopy <source> <dest> /CREATE /E /np /nfl /ndl /njh /njs
It'll do it in a few seconds.
vixay:
Thank you, vixay,
Looks complicated. Hmmm, where could I find this python script?
Many thanks again
-Biffle (August 16, 2016, 05:40 AM)
--- End quote ---
Here
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version